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? 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'])."'"); ?> 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. Link to comment https://forums.phpfreaks.com/topic/195038-insert-on-page-load/#findComment-1025281 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.