Jump to content

Help With Code


whelpton

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.