One beginner's variable problem
Posted: Mon Aug 11, 2003 5:38 pm
Hi:
following are two very short code, I am stick in the variable problem, can someone can me? THanks!
this is the code of html file I open first
<HTML>
<HEAD></HEAD>
<BODY>
<FORM method="get" action="text.php">
WHo is your favourite authors?
<INPUT name="aaa" type="text">
<br>
<br>
<input type=submit>
</FORM>
</BODY>
</HTML>
This is the code in text. php in the same root directory
<HTML>
<HEAD></HEAD>
<BODY>
Your favorite author is:
<?php
echo $aaa;
?>
</BODY>
</HTML>
when I open the first page and click submi buttont,
how the outcome shows so?
Your favorite author is:
Notice: Undefined variable: aaa in c:\inetpub\wwwroot\text.php on line 6
I think the variable has already sent to the php engine, then why can not find variable of aaa.
I am sure there is no any problem about the upper case and lower case.
Thanks
following are two very short code, I am stick in the variable problem, can someone can me? THanks!
this is the code of html file I open first
<HTML>
<HEAD></HEAD>
<BODY>
<FORM method="get" action="text.php">
WHo is your favourite authors?
<INPUT name="aaa" type="text">
<br>
<br>
<input type=submit>
</FORM>
</BODY>
</HTML>
This is the code in text. php in the same root directory
<HTML>
<HEAD></HEAD>
<BODY>
Your favorite author is:
<?php
echo $aaa;
?>
</BODY>
</HTML>
when I open the first page and click submi buttont,
how the outcome shows so?
Your favorite author is:
Notice: Undefined variable: aaa in c:\inetpub\wwwroot\text.php on line 6
I think the variable has already sent to the php engine, then why can not find variable of aaa.
I am sure there is no any problem about the upper case and lower case.
Thanks