pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jesus Rios <galiza-vermelha@wanadoo.es>
To: POSTGRESLQ-PHP <pgsql-php@postgresql.org>
Subject: checking a form
Date: Mon, 27 Jan 2003 18:07:48 +0100
Message-ID: <200301271708.h0RH82M0032164@smtp.wanadoo.es> (raw)


Hi everybody. First be patiently with my English.I am from Galiza country.

I am a new php-postgresql user. I am making a form. After submit this form, 
it will take us to an archive.php. Firts i would do is to check if every 
form'elements  are not-white.It is, if everyone have been selected.
I was tryng  so using  $HTTP_POST_VARS) and cheking if every slots where not 
-white.

$comprova_form=comprovaformulario($HTTP_POST_VARS)
function comprovaformulario($var)
 {
  $num=count($var);
  for ($i=1;$i<$num;$i++)
   {
    if (empty($var[$i]))
     {
      return false; 	
     }	 	
   }        
 }	



 But it is wrong  for example in the case of a checkbox: it does not must be 
on all off then.

How can i do this???.

Thank you.



Message-ID: <200301271708.h0RH82M0032164@smtp.wanadoo.es>
Permalink:  ../200301271708.h0RH82M0032164@smtp.wanadoo.es/
Also on:    postgresql.org/message-id/200301271708.h0RH82M0032164@smtp.wanadoo.es

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: galiza-vermelha@wanadoo.es
  Subject: Re: checking a form
  In-Reply-To: <200301271708.h0RH82M0032164@smtp.wanadoo.es>
  References: <200301271708.h0RH82M0032164@smtp.wanadoo.es>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox