jack bro Posted March 30, 2009 Share Posted March 30, 2009 I have this on register page to keep track how many people each user has refereed. mysql_query("UPDATE users SET totalref=totalref+1 WHERE username='$reff'"); Some reason the value dont increase. Jack. Quote Link to comment https://forums.phpfreaks.com/topic/151829-solved-simple-line-aint-working/ Share on other sites More sharing options...
lonewolf217 Posted March 30, 2009 Share Posted March 30, 2009 <?php $sql = "UPDATE users SET totalref=totalref+1 WHERE username='$reff'"; mysql_query($sql) or die("Error executing: $sql" . mysql_error()); ?> see what the error is Quote Link to comment https://forums.phpfreaks.com/topic/151829-solved-simple-line-aint-working/#findComment-797247 Share on other sites More sharing options...
wildteen88 Posted March 30, 2009 Share Posted March 30, 2009 How is $reff set? Where is it coming from? Quote Link to comment https://forums.phpfreaks.com/topic/151829-solved-simple-line-aint-working/#findComment-797248 Share on other sites More sharing options...
jack bro Posted March 31, 2009 Author Share Posted March 31, 2009 My stupid mistrake of adding reff instead of ref can't believe I didn't realise before. Sorry for wasting your time. Thanks, Jack. Quote Link to comment https://forums.phpfreaks.com/topic/151829-solved-simple-line-aint-working/#findComment-797945 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.