Forum Moderators: coopster
Ex. $name=$_post['name']
$email=$_post['email']
Could anyone please tell me how to either locate the php.ini file on my mac to turn on register_globals or advise on a better way to handle form input with php.
Thanks!
<IfModule mod_php5.c>
php_flag register_globals on
</IfModule>
(change php5 to php4 as appropriate)
More information: [entropy.ch...]
;)
Edit: before the wowsers jump in - you can also use the $_GET and $_POST global arrays instead of register_globals
Don't use register_globals. Use the normal globals: POST, GET, SERVER, COOKIE, SESSION, etc
php is case sensitive, that's why you don't populate the email. It should be capital letters
$name=$_POST["name"];
$email=$_POST["email"];
And make sure that you name (not id) the inputs correctly
<input type="text" name="name">Put in your name
And also make sure that method in form is post, not get:
<form action="#" method="POST">
It should work now, disregarding what's in the php.ini
Best regards
Michal Cibor