Got a hidden iframe in a webpage that invokes a PHP script:
<iframe id="offers" src="captcha/getoffers.php" etc
The php populates the iframe with a list of current (ie where expiry date is >= current date) offer codes when the page is opened and it works fine. However, I am also trying to update the table with any expired statuses:
if expired etc....
$id = mysql_result($result,$i,"id");
$r = mysql_query("UPDATE offers SET status=-1 WHERE id=$id");
That works when I refresh the page but not when I open it, although echo statements show it is going through the loop on open, so can't see why the query line is not working. Any great ideas? Cheers.
<iframe id="offers" src="captcha/getoffers.php" etc
The php populates the iframe with a list of current (ie where expiry date is >= current date) offer codes when the page is opened and it works fine. However, I am also trying to update the table with any expired statuses:
if expired etc....
$id = mysql_result($result,$i,"id");
$r = mysql_query("UPDATE offers SET status=-1 WHERE id=$id");
That works when I refresh the page but not when I open it, although echo statements show it is going through the loop on open, so can't see why the query line is not working. Any great ideas? Cheers.
Comment