PHP Post Var

software development

#1

Does anyone know why I can’t read a POSt var in PHP? Is there some special setting I’m missing? I just transferred over to dreamhost from another server and all my sites are having this same problem.

I’m no noob, I’ve been doing this for 5-6 years so I know my code is right, but it’s like PHP isn’t getting POST vars.

Example:

echo $_POST[“email”];

It cannot / will not read the post var. Ideas?


#2

Since you are accessing an array, try $_POST[‘email’] (note the single quotes).


Simon Jessey
Keystone Websites (business site) | si-blog (personal site with affiliate links)


#3

Are you using a custom compiled PHP? Insure you are sending a POST request to the page which is echoing the _POST? Have you tried sending the POST to an info.php page to see where your values are ending up (info.php contains a single line: <? phpinfo(); ?>)

There’s not much in your initial post to tell what you have done, checked, etc. You might have been doing this for 5 to 6 years; however, you’re definatly new at posting help requests. :slight_smile:


#4

Thanks, for the help. I tried it, but it didn’t work. :frowning: