mysql - PHP IF ELSE statement -
i have following statement in page , doesnt seem processing, can see obvious errors im missing?
else{ if($usersclass->register($_post['produgg_username'], md5($_post['produgg_password']), $_post['produgg_email'], $randomkey)) { print "success"; $toemail = $_post['produgg_email']; $touser = $_post['produgg_username']; // send activation email $to = $toemail; $subject = "activation"; $headers = "from: support@.co.uk"; $body = "howdy $touser!"; mail($to, $subject, $body, $headers); if(isset($_post['r']) { $refcode = mysql_real_escape_string($_post['r']); mysql_query(" update produgg_users set credits=credits+200000 produgg_users.id = ".$refcode or die(mysql_error()); }; }else{ print "error!"; } }
this line error out:
mysql_query(" update produgg_users set credits=credits+200000 produgg_users.id = ".$refcode or die(mysql_error());
should like
mysql_query( "update produgg_users set credits=credits+200000 produgg_users.id = ".$refcode) or die(mysql_error());
Comments
Post a Comment