On Sun, Mar 08, 2009 at 03:03:33PM +1100, Naz wrote:
>
> Generally, the approach I take is as follows:
>
> $errors = array();
> if (empty($_POST['name']))
>array_push($errors, 'A name was not entered.');
> if (empty($_POST['address']))
>array_push($errors, 'An address was no supplied.');
>
PJ wrote:
This is probably a mysql question, but their list is rather dull - I
think they don't appreciate my humor. Beside this list is fun ... and
informative.
Anyway, I can't figure this out. I am trying to verify inputs on a form
and even if I have all the required fields right, I still get t
Al wrote:
PJ wrote:
PJ wrote:
Daniel Brown wrote:
On Wed, Mar 4, 2009 at 17:51, PJ wrote:
elseif ($obligatoryFieldNotPresent = 1) {
$obligatoryFieldNotPresent = 0;
}
Are you certain you only wanted a single equal operator in the
last elseif() cond
>>> $obligatoryFieldNotPresent=null;
>>>
>>> foreach($_POST, as $value)
>>> {
>>> if(!empty($value)continue;
>>
>> Parse error. ;-P
>>
> There should be no comma there.
That fixes one, what about the rest? ;)
--
Postgresql & php tutorials
http://www.designmagick.com/
--
PHP General
Daniel Brown-7 wrote:
>
> On Wed, Mar 4, 2009 at 20:10, Al wrote:
>>
>> $obligatoryFieldNotPresent=null;
>>
>> foreach($_POST, as $value)
>> {
>>if(!empty($value)continue;
>
> Parse error. ;-P
>
There should be no comma there. See
http://id2.php.net/manual/en/control-structures.
On Wed, Mar 4, 2009 at 20:10, Al wrote:
>
> $obligatoryFieldNotPresent=null;
>
> foreach($_POST, as $value)
> {
> if(!empty($value)continue;
Parse error. ;-P
--
daniel.br...@parasane.net || danbr...@php.net
http://www.parasane.net/ || http://www.pilotpig.net/
50% Off All Shared Hos
finally found the problem... wrong names for string and this is what now
verifies correctly
if (strlen($_POST["titleIN"]) == 0 ) {
$obligatoryFieldNotPresent = 1;
}
elseif (strlen($_POST["first_nameIN"]) == 0 ) {
$obligatoryFieldNotPresent = 1;
}
elsei
PJ wrote:
PJ wrote:
Daniel Brown wrote:
On Wed, Mar 4, 2009 at 17:51, PJ wrote:
elseif ($obligatoryFieldNotPresent = 1) {
$obligatoryFieldNotPresent = 0;
}
Are you certain you only wanted a single equal operator in the
last elseif() condition? F
PJ wrote:
> PJ wrote:
>> Daniel Brown wrote:
>>
>>> On Wed, Mar 4, 2009 at 17:51, PJ wrote:
>>>
>>>
>>>
elseif ($obligatoryFieldNotPresent = 1) {
$obligatoryFieldNotPresent = 0; }
>>> Are you certain you only wanted a single equal operator in the
>>> last elseif() condi
Shawn McKenzie wrote:
Chris wrote:
PJ wrote:
Daniel Brown wrote:
On Wed, Mar 4, 2009 at 17:51, PJ wrote:
elseif ($obligatoryFieldNotPresent = 1) {
$obligatoryFieldNotPresent = 0;
}
Are you certain you only wanted a single equal operator in the
last elseif() condi
PJ wrote:
> Daniel Brown wrote:
>
>> On Wed, Mar 4, 2009 at 17:51, PJ wrote:
>>
>>
>>>elseif ($obligatoryFieldNotPresent = 1) {
>>>$obligatoryFieldNotPresent = 0;
>>>}
>>>
>>>
>> Are you certain you only wanted a single equal operator in the
>> last e
Chris wrote:
> PJ wrote:
>> Daniel Brown wrote:
>>> On Wed, Mar 4, 2009 at 17:51, PJ wrote:
>>>
elseif ($obligatoryFieldNotPresent = 1) {
$obligatoryFieldNotPresent = 0;
}
>>> Are you certain you only wanted a single equal operator in the
>>> last el
PJ wrote:
Daniel Brown wrote:
On Wed, Mar 4, 2009 at 17:51, PJ wrote:
elseif ($obligatoryFieldNotPresent = 1) {
$obligatoryFieldNotPresent = 0;
}
Are you certain you only wanted a single equal operator in the
last elseif() condition? Further, are you sure it shou
Daniel Brown wrote:
> On Wed, Mar 4, 2009 at 17:51, PJ wrote:
>
>>elseif ($obligatoryFieldNotPresent = 1) {
>>$obligatoryFieldNotPresent = 0;
>>}
>>
>
> Are you certain you only wanted a single equal operator in the
> last elseif() condition? Further, are you sure
On Wed, Mar 4, 2009 at 17:51, PJ wrote:
> elseif ($obligatoryFieldNotPresent = 1) {
> $obligatoryFieldNotPresent = 0;
> }
Are you certain you only wanted a single equal operator in the
last elseif() condition? Further, are you sure it should even be an
elseif() and not a str
This is probably a mysql question, but their list is rather dull - I
think they don't appreciate my humor. Beside this list is fun ... and
informative.
Anyway, I can't figure this out. I am trying to verify inputs on a form
and even if I have all the required fields right, I still get the error
tha
16 matches
Mail list logo