Hello,
I've installed php4.3.2 on my Redhat 8.0 box along with Apache2.046.
I'm trying to teach myself some php using Larry Ullman's book "PHP for
the World Wide Web".
There's one example I typed just as it appears in the book but it
dosen't work. I was wondering if there was some setting that needs to
be set in the php config for it to work.
The script is a simple html script, which calls a php script passing
it the variables which it got by the forms:
#########HTML SCRIPT###################
<html>
<head>
<title>HTML Form</title>
</head>
<body>
<form ACTION="HandleForm.php" METHOD=POST>
First Name<input TYPE=TEXT NAME="FirstName" SIZE=20><br>
Last Name <input TYPE=TEXT NAME="LastName" SIZE=20><br>
E-mail Address <input TYPE=TEXT NAME="Email" SIZE=60><br>
Comments <textarea NAME="Comments" ROWS=5 COLS=40></textarea><br>
<input TYPE=SUBMIT NAME="SUBMIT" VALUE="Submit!">
</form>
</body>
</html>
##############PHP SCRIPT "HandleForm.php"#####################
<HTML>
<HEAD>
<TITLE>Form Results</title>
<BODY>
<?php
/* This page receives and handles the data generated by "form.html".
*/
print "Your first name is $FirstName.<BR>\n";
print "Your last name is $LastName.<BR>\n";
print "Your E-mail is $Email.<BR>\n";
print "This is what you had to say:<BR>\n$Comments<BR>\n";
?>
</BODY>
</HTML>
####
This is the output:
Your first name is .
Your last name is .
Your E-mail is .
This is what you had to say:
All the variables are apparently empty. I've also tried with the GET
method. Any idea of what could be wrong in either my script or php
settings ?
Acteon