adrianle Posted March 12, 2010 Share Posted March 12, 2010 Hi gurus.. so I have a session variable (called "RID") already living on a site, but I need a PHP chunk that would automatically UPDATE a specific table/row related to that session ID, setting a given field to '1'. Suggestions? Quote Link to comment https://forums.phpfreaks.com/topic/195038-insert-on-page-load/ Share on other sites More sharing options...
JonnoTheDev Posted March 12, 2010 Share Posted March 12, 2010 <?php mysql_query("UPDATE table SET field='1' WHERE sid='".mysql_real_escape_string($_SESSION['RID'])."'"); ?> Quote Link to comment https://forums.phpfreaks.com/topic/195038-insert-on-page-load/#findComment-1025278 Share on other sites More sharing options...
adrianle Posted March 12, 2010 Author Share Posted March 12, 2010 Damn. you guys are good. Quote Link to comment https://forums.phpfreaks.com/topic/195038-insert-on-page-load/#findComment-1025281 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.