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 Quote Link to comment 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. Quote Link to comment 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.