Re: [PHP3] INSERT
| From: | Pavel Kalian | Date: | Thu, 25 May 2000 10:53:25 +0000 |
| Subject: | Re: [PHP3] INSERT | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-524@lists.php.net to get a copy of this message | ||
Hi Louise!
Check whether the field was filled properly and if it's not then complain to
the user or replace it with default/empty value of your choice like:
....
if (!isset($checkbox)) {
$checkbox="NO"
}
...
odbc_exec....
handling form input might be quite complex in some cases and the exact way
to do it depends pretty much on what exactly you want to do...
Pavel
----- Original Message -----
From: "Lubos Pechacek" <louise_konf@volny.cz>
To: "PHP" <php3@lists.php.net>
Sent: Thursday, May 25, 2000 12:37 PM
Subject: [PHP3] INSERT
> hi *,
>
> i need to INSERT some data from form into db through odbc. there are
> some fields in my form that are not required and that's the problem. if
> someone fills out my form and skip some fields nothing will be inserted
> in my db. how should i make the script to insert all data and instead of
> not filled fields insert empty item into my db (MS Access 97)?
>
> thanx Louise
>
>
> --
> PHP 3 Mailing List <http://www.php.net/>
> To unsubscribe, send an empty message to php3-unsubscribe@lists.php.net
> To subscribe to the digest, e-mail: php3-digest-subscribe@lists.php.net
> To search the mailing list archive, go to:
http://www.php.net/mailsearch.php3
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>