View Single Post
  #1 (permalink)  
Old July 11th, 2006, 05:39 PM
aspire aspire is offline
Registered User
 
Join Date: Jul 2006
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Undefined Variable

Right, I've got one of the PHP for Pro books from Wrox and im just beginning out and I've been trying to follow the tutorials but for some reason, this error keeps coming up even though i've followed the tutorials exactly. :/

Scenario: Userform.html has a form which ya put yer name in, it posts it to a processform.php but the processform.php always comes up with this error:
"Notice: Undefined variable: name in d:\Inetpub\wwwroot\testing\processform.php on line 4"

I understand that it doesnt seem to be getting the variable that I just inputted from the page before.

#### Userform.html

<html>

<FORM ACTION="processform.php" METHOD=POST>
Please type your name here: <br>
<INPUT TYPE=TEXT NAME=username> <br><br>
<INPUT TYPE=SUBMIT VALUE="Submit Data">
</FORM>
</html>

#### Processform.php

<html>

<?php
echo ("Welcome, " . $username . "!");
?>
</html>


Feedback please :)

i ASPIRE to be something....
Reply With Quote