RE: [PHP] isset question

2009-06-22 Thread Ford, Mike
On 19 June 2009 19:53, Ashley Sheridan advised: On Fri, 2009-06-19 at 12:36 +0100, Ford, Mike wrote: On 18 June 2009 20:25, LAMP advised: using !empty() instead isset() will work if you don't care for PHP Notice: Undefined variable... If you want to avoid PHP Notice you have to use both:

Re: [PHP] isset question

2009-06-21 Thread Gary
How does echoing back to the page make it vulnerable? This does not go to a DB if that makes any difference. Gary Paul M Foster pa...@quillandmouse.com wrote in message news:20090621032151.gb14...@quillandmouse.com... On Sat, Jun 20, 2009 at 12:20:56PM +0100, Ashley Sheridan wrote: On Sat,

Re: [PHP] isset question

2009-06-21 Thread Ashley Sheridan
On Sun, 2009-06-21 at 13:57 -0400, Gary wrote: How does echoing back to the page make it vulnerable? This does not go to a DB if that makes any difference. Gary Paul M Foster pa...@quillandmouse.com wrote in message news:20090621032151.gb14...@quillandmouse.com... On Sat, Jun 20,

Re: [PHP] isset question

2009-06-20 Thread Ashley Sheridan
On Sat, 2009-06-20 at 00:19 -0400, Paul M Foster wrote: On Fri, Jun 19, 2009 at 07:52:40PM +0100, Ashley Sheridan wrote: On Fri, 2009-06-19 at 12:36 +0100, Ford, Mike wrote: On 18 June 2009 20:25, LAMP advised: using !empty() instead isset() will work if you don't care for PHP

Re: [PHP] isset question

2009-06-20 Thread Reese
Waynn Lue wrote: I notice that you're checking $_POST['mort'] but you're echoing $mort, is that your actual code? That was my observation as well. Is $mort = $POST['mort']; being set somewhere else or not? If not, how is your script supposed to know what value $mort should be? And, what the

Re: [PHP] isset question

2009-06-20 Thread Gary
Yes... I echo the code onto the page as well as sending out the message. The echo is sort of a thank you page, this is what you submitted. A message, which is not going into a DB, is also emailed to the submitter and cleint. Gary Waynn Lue waynn...@gmail.com wrote in message

Re: [PHP] isset question

2009-06-20 Thread Paul M Foster
On Sat, Jun 20, 2009 at 12:20:56PM +0100, Ashley Sheridan wrote: On Sat, 2009-06-20 at 00:19 -0400, Paul M Foster wrote: On Fri, Jun 19, 2009 at 07:52:40PM +0100, Ashley Sheridan wrote: On Fri, 2009-06-19 at 12:36 +0100, Ford, Mike wrote: On 18 June 2009 20:25, LAMP advised:

RE: [PHP] isset question

2009-06-19 Thread Ford, Mike
On 18 June 2009 20:25, LAMP advised: using !empty() instead isset() will work if you don't care for PHP Notice: Undefined variable... If you want to avoid PHP Notice you have to use both: $msg.= (isset($_POST['mort']) and !empty($_POST['mort'])) ? The mortgage amount is $mort\n : ;

RE: [PHP] isset question

2009-06-19 Thread Ashley Sheridan
On Fri, 2009-06-19 at 12:36 +0100, Ford, Mike wrote: On 18 June 2009 20:25, LAMP advised: using !empty() instead isset() will work if you don't care for PHP Notice: Undefined variable... If you want to avoid PHP Notice you have to use both: $msg.= (isset($_POST['mort']) and

Re: [PHP] isset question

2009-06-19 Thread Paul M Foster
On Fri, Jun 19, 2009 at 07:52:40PM +0100, Ashley Sheridan wrote: On Fri, 2009-06-19 at 12:36 +0100, Ford, Mike wrote: On 18 June 2009 20:25, LAMP advised: using !empty() instead isset() will work if you don't care for PHP Notice: Undefined variable... If you want to avoid PHP Notice

[PHP] isset question

2009-06-18 Thread Gary
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

Re: [PHP] isset question

2009-06-18 Thread Stuart
2009/6/18 Gary gwp...@ptd.net: 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

Re: [PHP] isset question

2009-06-18 Thread Steve
Use !empty($_POST['mort']) instead of isset() for form input since the form will still set an empty value if left blank. Gary wrote: 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

Re: [PHP] isset question

2009-06-18 Thread LAMP
Steve wrote: Use !empty($_POST['mort']) instead of isset() for form input since the form will still set an empty value if left blank. Gary wrote: 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

Re: [PHP] isset question

2009-06-18 Thread Waynn Lue
I notice that you're checking $_POST['mort'] but you're echoing $mort, is that your actual code? On 6/18/09, Gary gwp...@ptd.net wrote: 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.

RE: [PHP] isset question

2009-06-18 Thread Yuri Yarlei
Java, after the world. Kyou wa PHP, ashita wa Java, sono ato sekai desu. Date: Thu, 18 Jun 2009 20:07:09 +0100 From: stut...@gmail.com To: gwp...@ptd.net CC: php-general@lists.php.net Subject: Re: [PHP] isset question 2009/6/18 Gary gwp...@ptd.net: I have a form that gives the submitter

Re[2]: [PHP] isset() question

2004-02-16 Thread Richard Davey
Hello Jason, Sunday, February 15, 2004, 7:44:06 PM, you wrote: I feel the book you're learning from might not be the best out there! Especially as it uses the horrible if : else : endif notation, includes code on the same line as the PHP tags themselves JW What is horrible about that style?

RE: [PHP] isset() question

2004-02-16 Thread Ford, Mike [LSS]
On 15 February 2004 18:30, Richard Davey wrote: I feel the book you're learning from might not be the best out there! Especially as it uses the horrible if : else : endif notation, I'd have to disagree with you on that one -- personally I think that's a very elegant and useful syntax, and all

Re: Re[2]: [PHP] isset() question

2004-02-16 Thread Jason Wong
On Monday 16 February 2004 18:14, Richard Davey wrote: Consistency. With what? With whose idea of style/formatting? I doubt you will find consistency in the real between different programmers/organisations. If such consistency was there then PHP would've have only had to support a single

Re[4]: [PHP] isset() question

2004-02-16 Thread Richard Davey
Hello Jason, Monday, February 16, 2004, 2:21:01 PM, you wrote: Consistency. JW With what? With whose idea of style/formatting? If you hadn't chopped off the rest of my paragraph you'd have the answer. JW I doubt you will find consistency in the real between different JW

[PHP] isset() question

2004-02-15 Thread Anthony Ritter
The following script is from Kevin Yank's book (Sitepoint). When I test it _without_ entering a name in the text box and hit submit, the _next_ page loads - however the same page should load beacuse of the conditional if (!isset($name) ): . If I replace !isset() with empty()

Re: [PHP] isset() question

2004-02-15 Thread Richard Davey
Hello Anthony, Sunday, February 15, 2004, 4:43:12 PM, you wrote: AR Why doesn't the call to !isset() with the negation mark loads the next page AR when a name is not entered? Because it's using isset() in the wrong capacity. isset() does not check to see if a variable HAS a value, it checks to

Re: [PHP] isset() question

2004-02-15 Thread Anthony Ritter
- Original Message - From: Richard Davey [EMAIL PROTECTED] Hello Anthony, I feel the book you're learning from might not be the best out there! Especially as it uses the horrible if : else : endif notation, includes code on the same line as the PHP tags themselves and is teaching

Re: [PHP] isset() question

2004-02-15 Thread Jason Wong
On Monday 16 February 2004 02:30, Richard Davey wrote: I feel the book you're learning from might not be the best out there! Especially as it uses the horrible if : else : endif notation, includes code on the same line as the PHP tags themselves What is horrible about that style? IMO doing