Jump to content

$_POST udenfined


jimfog

Recommended Posts

Take a look at this code....

   var_dump($_POST['email']);     if(($_POSΤ['email']))         {       var_dump($_POST['email']);         } 

The above code is found in a script which accepts ajax requests from a form...one field of which is the e-mail....

 

The strange part:

While vardumping $_POST['email'] gives the value of it...

Inside the IF statement the same variable gets to be undefined...how can that be?

Link to comment
Share on other sites

In the above code the 2 var_dump statements, if both of them run, will never display different data. If that's not the code you're actually working with then post the code you're actually working with. It should be obvious that in that hypothetical the value never changes.

Link to comment
Share on other sites

I found what the problem was...it was just a typo...there was a space between the dollar sign and the underscore.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...