Jump to content

if statement


ohdang888

Recommended Posts

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.

Link to comment
Share on other sites

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 ;
  }

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.