joonstar
05-01-2003, 04:25 AM
Next code is in my index.php.
-------------------------------------------------------------------------
<a href="welcome.php?name=Kevin"> LINK </a>
--------------------------------------------------------------------------
and Next code is in welcome.php.
--------------------------------------------------------------------------
<?php
echo( "Welcome to our Web site, $name!" );
?>
---------------------------------------------------------------------------
If a user clicks the LINK in index.php,
the page is suppose to say "Welcome to our Web site, Kevin!" .
However, it says;
"Notice: Undefined variable: name in c:\program files\apache group\apache\htdocs\welcome.php on line 8
Welcome to our Web site, !"
Undefined variable?
I think I defined the variable name as name=Kevin in index.php.
What is wrong in your think?
-------------------------------------------------------------------------
<a href="welcome.php?name=Kevin"> LINK </a>
--------------------------------------------------------------------------
and Next code is in welcome.php.
--------------------------------------------------------------------------
<?php
echo( "Welcome to our Web site, $name!" );
?>
---------------------------------------------------------------------------
If a user clicks the LINK in index.php,
the page is suppose to say "Welcome to our Web site, Kevin!" .
However, it says;
"Notice: Undefined variable: name in c:\program files\apache group\apache\htdocs\welcome.php on line 8
Welcome to our Web site, !"
Undefined variable?
I think I defined the variable name as name=Kevin in index.php.
What is wrong in your think?