liamloveslearning Posted June 30, 2011 Share Posted June 30, 2011 Hi all . Im trying to have a query run if a post variable is set, I have the following code only its not working can anybody see something im missing? if(isset($_POST['r']) { $refcode = mysql_real_escape_string($_POST['r']); mysql_query(" UPDATE produgg_users SET credits=credits+200000 where produgg_users.id = ".$refcode) or die(mysql_error(); }; Link to comment https://forums.phpfreaks.com/topic/240824-if-statement-stopping-page-from-working/ Share on other sites More sharing options...
Maq Posted June 30, 2011 Share Posted June 30, 2011 Missing a terminating ')'. The error message would help. Link to comment https://forums.phpfreaks.com/topic/240824-if-statement-stopping-page-from-working/#findComment-1236929 Share on other sites More sharing options...
KevinM1 Posted June 30, 2011 Share Posted June 30, 2011 if(isset($_POST['r'])) { $refcode = mysql_real_escape_string($_POST['r']); mysql_query(" UPDATE produgg_users SET credits=credits+200000 where produgg_users.id = ".$refcode) or die(mysql_error()); } Link to comment https://forums.phpfreaks.com/topic/240824-if-statement-stopping-page-from-working/#findComment-1236931 Share on other sites More sharing options...
liamloveslearning Posted June 30, 2011 Author Share Posted June 30, 2011 Brilliant! thanks guys Link to comment https://forums.phpfreaks.com/topic/240824-if-statement-stopping-page-from-working/#findComment-1236934 Share on other sites More sharing options...
Maq Posted June 30, 2011 Share Posted June 30, 2011 Brilliant! thanks guys If you turn on error reporting it will tell you exactly what & where the error is rather than a blank page. Link to comment https://forums.phpfreaks.com/topic/240824-if-statement-stopping-page-from-working/#findComment-1236935 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.