[OT] Re: [Xitami] Xitami and PHP POST method

TW xitami@lists.xitami.org
Wed, 09 Oct 2002 12:28:09 +0200


>I try to learning some php functions, it doesent work!
>
>input.php file:
>
>output.php file:
><?php print($mytext); ?>
>The error is allways:
>
>Notice: Undefined variable: mytext in C:\Xitami\webpages\mytest\output.php
>on line 7

howdy,

your code example is poorly chosen. The content of input.php is missing.
So, obviously, it is what it says. Undefined variable $mytext.
Either, you don't have a variable mytext in your form or you didn't assign 
a value to it.
Use
if (isset($mytext)) {print ($mytext);} else {print("OMG, I forgot to set my 
variable");}
to avoid the error.
Check input.php for existence of the variable.

BTW, courses in php basics are off topic here and should at least be marked 
as such.

regards,
tony