whelpton Posted July 23, 2008 Share Posted July 23, 2008 Ok the code I am using so far is: <?php include 'config.php'; if(isset($_POST['submit'])) { $refer = addslashes(trim($_POST['refercode'])); $do0 = mysql_query("SELECT referused FROM Users WHERE id = '$refer'") or die(mysql_error()); $do = mysql_query("UPDATE Users SET referused = 1 WHERE id = '$refer' LIMIT 1") or die(mysql_error()); $do2 = mysql_query("UPDATE Users SET kquota = kquota + 50 WHERE id = '$refer' LIMIT 1") or die(mysql_error()); echo '<script>alert("Your friend has been informed that you have signed up with kopoloko! ");</script>'; ?><? } mysql_close($l); ?> I presume the problem I am having is with: $do0 = mysql_query("SELECT referused FROM Users WHERE id = '$refer'") or die(mysql_error()); Essentially, i want to check weather the referused = 1 and if it does, the script does not continue. Thanks for your help Link to comment https://forums.phpfreaks.com/topic/116301-help-with-code/ Share on other sites More sharing options...
fenway Posted July 23, 2008 Share Posted July 23, 2008 That's a php issue... mysql doesn't know what you want to do. Link to comment https://forums.phpfreaks.com/topic/116301-help-with-code/#findComment-598064 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.