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 >

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" wrote in message > news:20090621032151.gb14...@quillandmouse.com... > > On Sat, Jun 20, 2009 at 12:20:

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" wrote in message news:20090621032151.gb14...@quillandmouse.com... > On Sat, Jun 20, 2009 at 12:20:56PM +0100, Ashley Sheridan wrote: > >> On Sat, 2009-06-20 at 00:

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-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" wrote in message news:d29bea5e0906181231r165c584

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 ot

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

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

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'

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-18 Thread Yuri Yarlei
? "The mortgage amount is $mort\n" : " "); Yuri Yarlei. Programmer PHP, CSS, Java, PostregreSQL; Today PHP, tomorrow 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: gw

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 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 on the li

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 le

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 Stuart
2009/6/18 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 m

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 al

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

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 > tea

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 t