Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Debugging PHP

Why aren't my form values being passed to the next page? by jimoblak
Posted: 4 Jun 03

Some basic PHP tutorials show how you can access data passed in a form in this manner:

<form name="myform" action="RESULT.PHP" method="post">
<input type="text" name="mydata">
<input type="submit" value="Submit">

print 'You entered: ' . $mydata;

This is a very simple and insecure method of passing data.  If this script does not work for you, then PHP has been configured with register_globals set to OFF in the php.ini file.  All installations of PHP 4.2.0 and above default to OFF.

The correct way to obtain the data in the example above is:
print 'You entered: ' . $_POST[mydata];

Further details are explained at:

Back to PHP FAQ Index
Back to PHP Forum

My Archive

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close