ohdang888 Posted March 3, 2008 Share Posted March 3, 2008 ok i'm having a problem with this.... the page is "edit_settings.php?source=1" this is where the problem is: function sql_quote($data) { if (get_magic_quotes_gpc()) { $data = stripslashes($data); } return addslashes($data); } $id = $_SESSION['id']; $new = sql_quote($GET['source']); if ($new == 1){ echo 'You have successfully reigstered!'; echo '<br>'; echo '<font size=6>'; echo 'IMPORTANT: Please take a moment to review your profile settings.'; } but the "you have registersed" and "take a moment" is not showing up at all. whats wrong? Any help is greatly appreciated! thanks. Quote Link to comment Share on other sites More sharing options...
me1000 Posted March 3, 2008 Share Posted March 3, 2008 if ($new == "1"){ try that... Quote Link to comment Share on other sites More sharing options...
teng84 Posted March 3, 2008 Share Posted March 3, 2008 echo $new ; to see why! Quote Link to comment Share on other sites More sharing options...
teng84 Posted March 3, 2008 Share Posted March 3, 2008 if ($new == "1"){ try that... $new==1 and $new=="1" is the same not unless you do this 1==='1' so it will give you false Quote Link to comment Share on other sites More sharing options...
ohdang888 Posted March 3, 2008 Author Share Posted March 3, 2008 when i echo $new, nothing comes up, so "1" isn't even stored in it. what wrong with my the grabbing part of my code then? Quote Link to comment Share on other sites More sharing options...
teng84 Posted March 3, 2008 Share Posted March 3, 2008 no return value function sql_quote($data) { if (get_magic_quotes_gpc()) { $data = stripslashes($data); } should be function sql_quote($data) { if (get_magic_quotes_gpc()) { $data = stripslashes($data); return $data ; } Quote Link to comment Share on other sites More sharing options...
ohdang888 Posted March 3, 2008 Author Share Posted March 3, 2008 its still not working. but what does return data mean? Quote Link to comment Share on other sites More sharing options...
teng84 Posted March 3, 2008 Share Posted March 3, 2008 your calling the function right so if its not returning any value then your variable not be set because the function does nothing do you have a value for this $GET['source'] tho echo that and ill try to fix your logic Quote Link to comment Share on other sites More sharing options...
ohdang888 Posted March 3, 2008 Author Share Posted March 3, 2008 echo $GET['source']; that is also doing nothing, it must be higher up. Quote Link to comment Share on other sites More sharing options...
teng84 Posted March 3, 2008 Share Posted March 3, 2008 echo $GET['source']; that is also doing nothing, it must be higher up. is that really $GET['source']; and not $_GET['source']; ??? once you manage to get the value of the $_GET add the code i gave you and you'll be fine 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.