I have been working on this for some time and almost got the script done.i finished the admin changed the database and the code in all the pages but the one im stuck on.Im redoing my traffic exchange script and converting to surf for cash.I am trying to make it fully automatic as in paying a member 2% for 150 sites surfed.The code i modified in nav bar will show a popup after the 150 sites surfed and will auto update the users account cash level. my problem is i want it to show once after the 150 and not be reactivated for 24 hours(1 day) i have tried a few differnt methods but keep getting parse errors or just dont work at all.Its using sessions on script to keep track of users and becouse the popin is in middle of page code cant get cookies to work any ideas how to do this?here is the code for the popup


if (isset($sess_data['contex'])) {
if (($sess_data['sts'] % $sess_data['contex']) == 0) {
$sess_data['won'] = 'really';
unset($sess_data['won']);
$res = mysql_query("update user set cash=cash+$sess_data[cash1] where id=$sess_data[usrid]");
$surpres = mysql_query("update adminprops set value=value-$sess_data[contey] where field='surplu'");

echo("<p align=center><span class=big><font color=\"ff0000\">if your a Gold member you got Cash!</font></span></p>\n");
secfooter();
mysql_close;

i hope some one can help i can send whole page if necessary