close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Restricting media file play count.

Thread began 5/19/2010 9:55 am by fdotmedia | Last modified 5/20/2010 1:23 pm by fdotmedia | 1591 views | 3 replies

fdotmedia

Restricting media file play count.

I've run the wizard and added the session details - works perfectly...

I have a question that maybe someone can help with...

I have three pages - login.php, home.php and player.php... The login page is self explanatory and after the individual is logged in we return the following session variables:

ID, USER, PRODUCT, PATH, PLAYS and TOTAL

On the home page I'm returning a recordset loop filtered by the EID to display the product title, product link, plays available and total plays purchased... The recordset returns all the data correctly and even loads the flash file correctly... But when I istitute a simple math equation, e.g. PLAYS > TOTAL, it behaves correctly for an exceeded plays and behaves incorrectly for a non exceeded plays - meaning both redirect to the expired.php page.

The first question is - Does SecurityAssist (or Webassist to a greater extent) have something that can do a better job with the following equation?

<?php
$ePlays = $row_eVideo['ePlays'];
$ePlayed = $row_eVideo['ePlayed'];

if ($ePlayed > $ePlays) {
header('Location: expired.php');
}
else{
}

?>


The second question is - Is there a way to add +1 to a table on a page load versus an update form? An example would be adding 1 to 4 in ePlayed to equal 5... I would like the player.php page to add a 1 to the total 'ePlayed' for that EID...

I know I'm asking a lot - but - I'm kinda stuck!

Thanks,
Ted

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...