Hello, I'm fairly new to PHP. I've worked a lot with perl and javascript though. Anyway, I'm trying to pass data from a form to a php page for processing. I'm running WinXP, Apache 2.0.40 and PHP 4 on my home computer right now. I can run PHP files perfectly, except when it comes to reading form data. Here is my form.html file:
<html>
<head>
<title>Form</title>
</head>
<body>
<form action="process.php" method="post">
First Name: <input type="text" name="first_name"><br>
Last Name: <input type="text" name="last_name"><br><br>
<input type="submit" name="submit" value="Submit">
</form>
</body>
</html>
and here is process.php:
<html>
<head>
<title>Results</title>
</head>
<body>
<p>Your information has been processed.</p>
<?php
print "Thank you $first_name $last_name.<br>";
?>
</body>
</html>
This works perfectly on my website: http://www.industrialtechware.com/form.html
It doesn't work on my computer. I've tried using the get method, and it will put the varibles in the url as it should, but won't print them. It prints Thank you, but will not print the varibles. What am I doing wrong? I tried this with Apache 1.3.x and PHP 3 and it did the same thing. Is there a problem with Windows or my setup or what? I need this for testing purposes. Thanks.
Jeff Kieke