defeater
08-17-2002, 10:47 AM
help me with this notice.
When I select "go" button then get notice as follows:
!PHP Notice: Undefined variable: firstname in E:\Studying\PHP\handon\welcome.php on line 2 PHP Notice: Undefined variable: lastname in E:\Studying\PHP\handon\welcome.php on line 2
I have two .php file. That is ex4.php and welcome.php with code as follows:
ex4.php
<html>
<body>
<FORM ACTION="welcome.php" METHOD=GET>
First Name: <INPUT TYPE=TEXT NAME="firstname"><BR>
Last Name: <INPUT TYPE=TEXT NAME="lastname">
<INPUT TYPE=SUBMIT VALUE="GO">
</FORM>
</html>
</body>
welcome.php
<html>
<?php echo( "$firstname $lastname!" );?>
</html>
When I select "go" button then get notice as follows:
!PHP Notice: Undefined variable: firstname in E:\Studying\PHP\handon\welcome.php on line 2 PHP Notice: Undefined variable: lastname in E:\Studying\PHP\handon\welcome.php on line 2
I have two .php file. That is ex4.php and welcome.php with code as follows:
ex4.php
<html>
<body>
<FORM ACTION="welcome.php" METHOD=GET>
First Name: <INPUT TYPE=TEXT NAME="firstname"><BR>
Last Name: <INPUT TYPE=TEXT NAME="lastname">
<INPUT TYPE=SUBMIT VALUE="GO">
</FORM>
</html>
</body>
welcome.php
<html>
<?php echo( "$firstname $lastname!" );?>
</html>