<[EMAIL PROTECTED]> Nabil: > 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 if (!isset($_POST['msg'])) die("No message!"); if ($_POST['msg'] == 'hi') { // do something } ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php