Anthony Assuming you have not omitted any of the code for script 2: You need to have a get the posted value at the start of script 2 i.e. $username = $_REQUEST['userName']; Mike ----- Original Message ----- From: "aomarlow" <aomarlow@xxxxxxxxx> To: <php-windows@xxxxxxxxxxxxx> Sent: Tuesday, November 23, 2004 1:36 PM Subject: What's wrong with these two programs? > Hi, > > Can anyone tell me what's wrong with the two following > programs? The first (whatsName.html) is straight > HTML, and is supposed to build a form that asks a > question. The second program, (hiUser.php) is > supposed to read the value input by the user, and > process it. I'm not having any trouble with the first > program, but when the second program runs, it prints > out code, rather than getting the result that it is > supposed to get. > > Have I linked the two programs in the wrong way, or > something like that? BTW, both of these programs are > sample programs from the book, "PHP 5/MySQL > Programming for the Absolute Beginner." > > Here are the two programs: > > 1.) whatsName.html: > > <html> > <head> > <title>What's your name?</title> > </head> > <body> > > <h1>What's your name?</h1> > <h3>Writing a form for user input</h3> > > <form method = "post" > action = "hiUser.php"> > Please type your name: > <input type = "text" > name = "userName" > value = ""> > > <br> > <input type = "submit"> > > </form> > > </body> > </html> > > Here is program #2.) hiUser.php: > > <html> > <head> > <title>Hi User</title> > </head> > <body> > <h1>Hi User</h1> > <h3>PHP program that receives a value from > "whatsName"</h3> > > <? > print "<h3>Hi there, $userName!</h3>"; > > ?> > > </body> > </html> > > Your help is always appreciated! > Anthony > > > > > > __________________________________ > Do you Yahoo!? > The all-new My Yahoo! - Get yours free! > http://my.yahoo.com > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php