Re: [PHP] Re: isset question
Gary wrote: This is what I have now and it works. I do know that on the second line I have $_POST['mort']}\n : ; in the second half. I'm not sure I understand the comment about use the !empty if you dont care about PHP. if you don't care about PHP Notice... eror_reporting: http://us.php.net/manual/en/function.error-reporting.php http://us.php.net/manual/en/errorfunc.constants.php#errorfunc.constants.errorlevels.e-notice put error_reporting(E_ALL) on the begining of you page you will get errors, warnings and notices - if any. errors and warnings stop the execution of the code. notice not. notices are usually about not defined variables before you started to use them. if you put error_reporting(E_ALL ^ E_NOTICE) it will not bother you. but I like to do everything correctly. :-) afan But this is working, and unless someone sees a problem with it, I will leave it as is. Thank you to everyone for helping. Gary $msg.= !empty($_POST['purchprice']) ? If this information is completed, it is a new purchase.\n The Purchase Price is $purchprice\n : ; $msg.= !empty($_POST['mort']) ? The mortgage amount is {$_POST['mort']}\n : ; $msg.= !empty($_POST['howlong']) ? The sellers have owned the property for $howlong\n\n\n : ; $msg.= !empty($_POST['mortgage']) ? If this information is completed, it is a refinance.\nThe mortgage amount is $mortgage\n : ; $msg.= !empty($_POST['purdate']) ? The property was originally purchased on $purdate\n : ; $msg.= !empty($_POST['datefin']) ? The property was last financed $datefin\n : ; Gary gwp...@ptd.net wrote in message news:ea.e8.08167.6ac8a...@pb1.pair.com... I have a form that gives the submitter a choice or either one set of questions, or another. I am still getting the message even if the input was left blank. So on the line below, $msg.= isset($_POST['mort']) ? The mortgage amount is $mort\n : ; I get The mortgage amount is What am I missing here? Thanks Gary -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: isset question
error_reporting( E_ALL | E_STRICT ); if you want to be extremely sure about your app (only in develop) On Thu, Jun 18, 2009 at 5:04 PM, LAMP l...@afan.net wrote: Gary wrote: This is what I have now and it works. I do know that on the second line I have $_POST['mort']}\n : ; in the second half. I'm not sure I understand the comment about use the !empty if you dont care about PHP. if you don't care about PHP Notice... eror_reporting: http://us.php.net/manual/en/function.error-reporting.php http://us.php.net/manual/en/errorfunc.constants.php#errorfunc.constants.errorlevels.e-notice put error_reporting(E_ALL) on the begining of you page you will get errors, warnings and notices - if any. errors and warnings stop the execution of the code. notice not. notices are usually about not defined variables before you started to use them. if you put error_reporting(E_ALL ^ E_NOTICE) it will not bother you. but I like to do everything correctly. :-) afan But this is working, and unless someone sees a problem with it, I will leave it as is. Thank you to everyone for helping. Gary $msg.= !empty($_POST['purchprice']) ? If this information is completed, it is a new purchase.\n The Purchase Price is $purchprice\n : ; $msg.= !empty($_POST['mort']) ? The mortgage amount is {$_POST['mort']}\n : ; $msg.= !empty($_POST['howlong']) ? The sellers have owned the property for $howlong\n\n\n : ; $msg.= !empty($_POST['mortgage']) ? If this information is completed, it is a refinance.\nThe mortgage amount is $mortgage\n : ; $msg.= !empty($_POST['purdate']) ? The property was originally purchased on $purdate\n : ; $msg.= !empty($_POST['datefin']) ? The property was last financed $datefin\n : ; Gary gwp...@ptd.net wrote in message news:ea.e8.08167.6ac8a...@pb1.pair.com... I have a form that gives the submitter a choice or either one set of questions, or another. I am still getting the message even if the input was left blank. So on the line below, $msg.= isset($_POST['mort']) ? The mortgage amount is $mort\n : ; I get The mortgage amount is What am I missing here? Thanks Gary -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Martin Scotta
Re: [PHP] Re: isset question
Martin Scotta wrote: error_reporting( E_ALL | E_STRICT ); if you want to be extremely sure about your app (only in develop) Actually, I use error_reporting(E_ALL) while developing :-) Afan On Thu, Jun 18, 2009 at 5:04 PM, LAMP l...@afan.net mailto:l...@afan.net wrote: Gary wrote: This is what I have now and it works. I do know that on the second line I have $_POST['mort']}\n : ; in the second half. I'm not sure I understand the comment about use the !empty if you dont care about PHP. if you don't care about PHP Notice... eror_reporting: http://us.php.net/manual/en/function.error-reporting.php http://us.php.net/manual/en/errorfunc.constants.php#errorfunc.constants.errorlevels.e-notice put error_reporting(E_ALL) on the begining of you page you will get errors, warnings and notices - if any. errors and warnings stop the execution of the code. notice not. notices are usually about not defined variables before you started to use them. if you put error_reporting(E_ALL ^ E_NOTICE) it will not bother you. but I like to do everything correctly. :-) afan But this is working, and unless someone sees a problem with it, I will leave it as is. Thank you to everyone for helping. Gary $msg.= !empty($_POST['purchprice']) ? If this information is completed, it is a new purchase.\n The Purchase Price is $purchprice\n : ; $msg.= !empty($_POST['mort']) ? The mortgage amount is {$_POST['mort']}\n : ; $msg.= !empty($_POST['howlong']) ? The sellers have owned the property for $howlong\n\n\n : ; $msg.= !empty($_POST['mortgage']) ? If this information is completed, it is a refinance.\nThe mortgage amount is $mortgage\n : ; $msg.= !empty($_POST['purdate']) ? The property was originally purchased on $purdate\n : ; $msg.= !empty($_POST['datefin']) ? The property was last financed $datefin\n : ; Gary gwp...@ptd.net mailto:gwp...@ptd.net wrote in message news:ea.e8.08167.6ac8a...@pb1.pair.com... I have a form that gives the submitter a choice or either one set of questions, or another. I am still getting the message even if the input was left blank. So on the line below, $msg.= isset($_POST['mort']) ? The mortgage amount is $mort\n : ; I get The mortgage amount is What am I missing here? Thanks Gary -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Martin Scotta -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php