I recommend the next variant if ($_POST["msg"] =="hi")
Why? I've created an html file with form's action parameter as info.php that contains phpinfo(). The result was PHP_SELF /~adolf/info.php _POST["a"] dv fdsvz _SERVER["CONTENT_LENGTH"] 10 You see, _POST["a"] ----- Original Message ----- From: "nabil" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, October 04, 2003 3:45 PM Subject: [PHP] PHP Notice: Undefined variable > I got PHP Notice: Undefined variable > > Should I define always any var ?? when do I have do define a var?? > > example if I want to write > <?php > if ($_POST['msg'] =='hi') > { > do something ... > } > ?> > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php