|
-
April 15th, 2005, 10:36 AM
#1
PHP Basics - Frustrated
Hi all. OK, Perl novice trying to learn PHP. I'm on XPSP2, Apache2 and PHP 5.0.4. Just installed everything, and trying this simple little form to test if PHP is working right...
<html>
<head><title>PHP says Hello</title></head>
<body>
<form method "POST" action="sayhello.php">
Your Name: <input type="text" name="user">
<input type="submit" value="Say">
</form>
</body>
</html>
sayhello.php is as follows...
<?php
print "Hello, ";
print $_POST['user'];
print "!";
?>
And finally, the result is... Hello, !
I have checked the Apache config, online sites and googled the error message in the Apache error log that says...
[client 127.0.0.1] PHP Notice: Undefined index: user in D:\\Apache2\\htdocs\\sayhello.php on line 4, referer: http://localhost/test.html
This is the first step and it is not working! At my wits end...HELP!
NOTE: I tried running a simple script that checks if PHP is installed right with your Apache server... <?phpinfo() ?> ...and it works fine!!!
Thanks,
Sonya
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|