Re: [PHP] verify problem

2009-03-08 Thread 9el
On Sun, Mar 8, 2009 at 7:31 AM, Ashley Sheridan wrote: > On Sat, 2009-03-07 at 06:23 -0800, Michael A. Peters wrote: > > Ashley Sheridan wrote: > > > > >> > > > I'm more a fan of lining up opening and closing brackets so they are at > > > the same indent level. It prevents one of the most popular

Re: [PHP] verify problem

2009-03-07 Thread Ashley Sheridan
On Sat, 2009-03-07 at 06:23 -0800, Michael A. Peters wrote: > Ashley Sheridan wrote: > > >> > > I'm more a fan of lining up opening and closing brackets so they are at > > the same indent level. It prevents one of the most popular errors caused > > by omitting a bracket, brace or other in the wron

Re: [PHP] verify problem

2009-03-07 Thread Paul M Foster
On Sat, Mar 07, 2009 at 02:13:11PM +, Ashley Sheridan wrote: > > And spaces instead of tabs! That's heresy! > No, it's python. ;-} Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] verify problem

2009-03-07 Thread Michael A. Peters
Nathan Rixham wrote: actually much of this discussion is null and voided by using a decent IDE, certainly eclipse, netbeans, zend ide all handle much of the formatting and indenting - the one gripe I have is that PDT2 is lacking the "format source" option which is a vast time-saver when usin

Re: [PHP] verify problem

2009-03-07 Thread Nathan Rixham
Michael A. Peters wrote: Ashley Sheridan wrote: I'm more a fan of lining up opening and closing brackets so they are at the same indent level. It prevents one of the most popular errors caused by omitting a bracket, brace or other in the wrong place. A few extra line breaks in the code are no

Re: [PHP] verify problem

2009-03-07 Thread Michael A. Peters
Ashley Sheridan wrote: I'm more a fan of lining up opening and closing brackets so they are at the same indent level. It prevents one of the most popular errors caused by omitting a bracket, brace or other in the wrong place. A few extra line breaks in the code are not going to make a noticeab

Re: [PHP] verify problem

2009-03-07 Thread Ashley Sheridan
On Sat, 2009-03-07 at 14:06 +, Nathan Rixham wrote: > Ashley Sheridan wrote: > > On Sat, 2009-03-07 at 13:42 +, Nathan Rixham wrote: > >> Ashley Sheridan wrote: > >>> On Thu, 2009-03-05 at 19:58 -0800, Michael A. Peters wrote: > PJ wrote: > > Nathan Rixham wrote: > >> Chris wro

Re: [PHP] verify problem

2009-03-07 Thread Nathan Rixham
Ashley Sheridan wrote: On Sat, 2009-03-07 at 13:42 +, Nathan Rixham wrote: Ashley Sheridan wrote: On Thu, 2009-03-05 at 19:58 -0800, Michael A. Peters wrote: PJ wrote: Nathan Rixham wrote: Chris wrote: PJ wrote: And again, this works: if (strlen($_POST["first_nameIN"]) == 0 ) {

Re: [PHP] verify problem

2009-03-07 Thread Ashley Sheridan
On Sat, 2009-03-07 at 13:42 +, Nathan Rixham wrote: > Ashley Sheridan wrote: > > On Thu, 2009-03-05 at 19:58 -0800, Michael A. Peters wrote: > >> PJ wrote: > >>> Nathan Rixham wrote: > Chris wrote: > > PJ wrote: > >> And again, this works: > >> if (strlen($_POST["first_nameIN"]

Re: [PHP] verify problem

2009-03-07 Thread Nathan Rixham
Ashley Sheridan wrote: On Thu, 2009-03-05 at 19:58 -0800, Michael A. Peters wrote: PJ wrote: Nathan Rixham wrote: Chris wrote: PJ wrote: And again, this works: if (strlen($_POST["first_nameIN"]) == 0 ) { $obligatoryFieldNotPresent = 1; ... this does not: if (strlen($_POST["firs

Re: [PHP] verify problem

2009-03-07 Thread Ashley Sheridan
On Thu, 2009-03-05 at 19:58 -0800, Michael A. Peters wrote: > PJ wrote: > > Nathan Rixham wrote: > >> Chris wrote: > >>> PJ wrote: > And again, this works: > if (strlen($_POST["first_nameIN"]) == 0 ) { > $obligatoryFieldNotPresent = 1; ... > > this does not: > >

Re: [PHP] verify problem

2009-03-05 Thread Michael A. Peters
PJ wrote: Nathan Rixham wrote: Chris wrote: PJ wrote: And again, this works: if (strlen($_POST["first_nameIN"]) == 0 ) { $obligatoryFieldNotPresent = 1; ... this does not: if (strlen($_POST["first_nameIN"]) > 0 ) && (strlen($_POST["last_nameIN"]) > 0 ) { echo $first_nameIN, " ",

Re: [PHP] verify problem

2009-03-05 Thread Nathan Rixham
PJ wrote: Nathan Rixham wrote: Chris wrote: PJ wrote: And again, this works: if (strlen($_POST["first_nameIN"]) == 0 ) { $obligatoryFieldNotPresent = 1; ... this does not: if (strlen($_POST["first_nameIN"]) > 0 ) && (strlen($_POST["last_nameIN"]) > 0 ) { echo $first_nameIN, " ",

Re: [PHP] verify problem

2009-03-05 Thread PJ
Chris wrote: > >>> Are both first_nameIN AND last_nameIN longer than 0 chars? >>> >>> var_dump($_POST['first_nameIN']); >>> var_dump($_POST['last_nameIN']); >>> >>> maybe you only filled in first_name or last_name but not both. >>> >> Well, >> echo $first_nameIN, " ", $last_nameIN; >> Prints out th

Re: [PHP] verify problem

2009-03-05 Thread PJ
Nathan Rixham wrote: > Chris wrote: >> PJ wrote: >>> And again, this works: >>> if (strlen($_POST["first_nameIN"]) == 0 ) { >>> $obligatoryFieldNotPresent = 1; ... >>> >>> this does not: >>> >>> if (strlen($_POST["first_nameIN"]) > 0 ) && >>> (strlen($_POST["last_nameIN"]) > 0 ) { echo

Re: [PHP] verify problem

2009-03-05 Thread Chris
Are both first_nameIN AND last_nameIN longer than 0 chars? var_dump($_POST['first_nameIN']); var_dump($_POST['last_nameIN']); maybe you only filled in first_name or last_name but not both. Well, echo $first_nameIN, " ", $last_nameIN; Prints out the whole name - without the if clause; and I'v

Re: [PHP] verify problem

2009-03-05 Thread Nathan Rixham
Chris wrote: PJ wrote: And again, this works: if (strlen($_POST["first_nameIN"]) == 0 ) { $obligatoryFieldNotPresent = 1; ... this does not: if (strlen($_POST["first_nameIN"]) > 0 ) && (strlen($_POST["last_nameIN"]) > 0 ) { echo $first_nameIN, " ", $last_nameIN); else (echo "error"

Re: [PHP] verify problem

2009-03-05 Thread PJ
Chris wrote: > PJ wrote: >> And again, this works: >> if (strlen($_POST["first_nameIN"]) == 0 ) { >> $obligatoryFieldNotPresent = 1; ... >> >> this does not: >> >> if (strlen($_POST["first_nameIN"]) > 0 ) && >> (strlen($_POST["last_nameIN"]) > 0 ) { echo $first_nameIN, " ", >> $last_nam

Re: [PHP] verify problem

2009-03-05 Thread Chris
PJ wrote: And again, this works: if (strlen($_POST["first_nameIN"]) == 0 ) { $obligatoryFieldNotPresent = 1; ... this does not: if (strlen($_POST["first_nameIN"]) > 0 ) && (strlen($_POST["last_nameIN"]) > 0 ) { echo $first_nameIN, " ", $last_nameIN); else (echo "error";)} But, $fir

[PHP] verify problem

2009-03-05 Thread PJ
And again, this works: if (strlen($_POST["first_nameIN"]) == 0 ) { $obligatoryFieldNotPresent = 1; ... this does not: if (strlen($_POST["first_nameIN"]) > 0 ) && (strlen($_POST["last_nameIN"]) > 0 ) { echo $first_nameIN, " ", $last_nameIN); else (echo "error";)} But, $first_nameIn an