Page 1 of 1

form data is not being transferred to php page

PostPosted: 04. June 2007 11:14
by varunmc
I am new to web development.

I was creating a registration form titled "register.html" and all the data items were put in a
<form name="new_user" action="register.php" method="post">

Now, whenever i press the SUBMIT button, all the data items are supposed to be accessible by the php script on the "register.php" page as data variables, but they are not.

I am not able to access these data items so i can store them in the database. Please help. Why are the data items not being transferred? I am sure that it will work if i upload these pages to a web server...but why aren't they working on my computer? I am using xampp package.

Please Help!

PostPosted: 04. June 2007 11:28
by Wiedmann
I am not able to access these data items so i can store them in the database. Please help. Why are the data items not being transferred?

You have read the php manual about "using external variables"?

PostPosted: 04. June 2007 15:11
by Codesmith
Register Globals is now disabled by default by all recent versions of PHP, for security reasons.

The correct way to access forum data is through the various super global arrays.

In your case your data should be stored in the $_POST array.

http://us.php.net/variables.predefined