0

I have two php pages - home.php and player.php...

home.php has a loop to show all the products EID has associated with it including TOTALPLAYS, PLAYCOUNT, USER, PASS, PRODUCT and PRODUCTPATH... player.php has a small script to find out if PLAYCOUNT > TOTALPLAYS as well as pulling in the PRODUCTPATH into the flash player.

My math script below gives me the correct 'location redirect' when it returns exceeds TOTALPLAYS, it redirects to expired.php when it does not exceed TOTALPLAYS as well.

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

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

I have a recordset that returns the EID and I even put the EID= on the link in the home page and it still returns expired...

Any help/suggestions would be great...

Ted

2
Contributors
6
Replies
7
Views
7 Years
Discussion Span
Last Post by changeco
0
<?php
	$ePlays = $row_eVideo['ePlays'];
	$ePlayed = $row_eVideo['ePlayed']; 
 
    if ($ePlayed > $ePlays) { 
		[B]header("Location: expired.php?eps=$ePlays&epd=$ePlayed");[/B]
	}
	else{
	}
 
?>

Check your values to see if they're actually set properly.
You don't have to handle the querystring params - just check the values in the address bar. Equally you could echo out the vars. However, this'll cause a 'headers already sent' error, although it's still useful.

0

The values are being set properly... It's sort of frustrating - I can make it work with timestamp but why won't it work with actual integers?

Frustrating I tell you...

0

How about:

<?php
	$ePlays = intval($row_eVideo['ePlays']);
	$ePlayed = intval($row_eVideo['ePlayed']); 
 
    if ($ePlayed > $ePlays) { 
		header("Location: expired.php");
	}
	else{
	}
 
?>
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.