php3-list | 2000051
Date: 05/03/00
- Next message: NickM: "Re: [PHP3] High Warning Levels (fwd)"
- Previous message: Kaspars: "Re: [PHP3] regexp"
- Next in thread: Devta Singh: "RE: [PHP3] $query, PHP3/MySQL"
- Reply: Devta Singh: "RE: [PHP3] $query, PHP3/MySQL"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hello all--
I made a web-based form, but only some of the values are going into the
database -- the textboxes and textareas. The single-select (in this case,
industry) and the multiple-select (industries) are ignored:
$industries = addslashes(implode(", ", $industries));
$query="INSERT INTO member(lastname,firstname,username,email,
industry,worktelephone,expertise,industries)
VALUES('$lastname','$firstname','$username','$email',
'$industry','$worktelephone','$expertise','$industries' )";
-------------------snip---------------
/ / the HTML from the previous page / / industries:
<SELECT NAME="industries[]" MULTIPLE SIZE="4">
<option>Accommodation and Food Services</option>
<option>Admin., Support, Waste Mgmt., Remediation</option>
<option>Agriculture, Forestry, Fishing, Hunting</option>
<option>Arts, Entertainment, Recreation</option>
. . .
</SELECT>
/ / industry:
<SELECT name="industry">
<option value="AC">Accommodation and Food Services</option>
<option value="AD">Admin., Support, Waste Mgmt., Remediation</option>
<option value="AG">Agriculture, Forestry, Fishing, Hunting</option>
<option value="AR">Arts, Entertainment, Recreation</option>
. . .
</SELECT>
------end snip-------
/ / $industries is the multiple select, set up in the TABLE with SET()
/ / $industry is the single select, set up in the TABLE with ENUM ()
Anyone see what I'm doing wrong? Or leaving out?
Thanks,
Margie
PHP 3.0.14 / MySQL 3.23.12 / Apache 1.3.11 on Win95
-- PHP 3 Mailing List <http://www.php.net/> To unsubscribe, send an empty message to php3-unsubscribe <email protected> To subscribe to the digest, e-mail: php3-digest-subscribe <email protected> To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: NickM: "Re: [PHP3] High Warning Levels (fwd)"
- Previous message: Kaspars: "Re: [PHP3] regexp"
- Next in thread: Devta Singh: "RE: [PHP3] $query, PHP3/MySQL"
- Reply: Devta Singh: "RE: [PHP3] $query, PHP3/MySQL"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

