New PHP question.

buc99

Don't Tread on Me!
I am playing around with PHP on my TiBook with 10.2.2 installed. When I run a simple php test page it works ok. But when I try the html form and php script, the data from the form is not passed to the variables in the php script for displaying.

for example:

The form might have "input type="text" name="YourName"" with a form action of post.

The php script might contain a print line with the variable "$YourName" but nothing gets printed.

Any ideas what is wrong here? Why is the form data not going to the variables in the php script?

Thanks.
SA:)
 
Never mind.

I figured out the problem. With PHP 4.2.x the globals are default off. So I have to use $_POST['submitbutton'] in place of $submitbutton.

Apparently this was set differently in 4.1.x and earlier.

Now everything is working correctly. I just declare the variables globally ahead of time in the script and all works great.

Thanks.
SA:)
 
Back
Top