Firstly, sorry that I didnt know where else to post this question.
Need help w/ PHP 4.2.0
I'm following this tutorial here, creating form and processing the info on that form.
form.html
Code:<html> <head> <title>Add Elements to a form</title> </head> <body> <h1>Welcome to this Site</h1> <form action="processForm.php" method="POST"> Your name: <input type="text" name="name"> Your age: <input type="text" name="age"> <input type="submit" value="Enter"> </form> </body> </html>
processForm.php
name.phpCode:<html> <head> <title>Process Form Data</title> </head> <body> <h3>Your info has been processed</h3> Hi <?php echo $_POST["name"]; ?>. You are <?php echo $_POST["age"]; ?> years old. <br> <a target="_new" href="name.php?name=<?php echo $_POST["name"]?>">Show name</a> </body> </html>
After entering both the name and age in the form (form.html) and hitting the Submit Query button, PHP processes the info and generates a file to display the name and age. There's also a link on that page to a new page which opens in a new window (name.php).Code:<html> <head> <title>name.php</title> </head> <body> <p>Applicant: <?php echo $_POST["name"]; ?> </body> </html>
The link (show name) works, but the new page (name.php) displays this error:
Applicant:
Notice: Undefined index: name in F:\myphp\name.php on line 9
It's supposed to display the name entered in the form.
What gives?
Thanx.



LinkBack URL
About LinkBacks


