RE: [PHP-DB] mysql and php

From: Date: Mon, 17 Jul 2000 17:04:32 +0000
Subject: RE: [PHP-DB] mysql and php
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-1197@lists.php.net to get a copy of this message
There may be a better way but I wrote this function. Let me know if it helps: Function options_look($arr,$category,$value) //Takes an array and searches it for $category and returns HTML code for a multiple Select option { { if (in_array($value,$arr)) //if its in the array then make it checked { $retvalue = $retvalue . "<option value=$value Selected>$category"; } else { $retvalue = "<option value=$value>$category"; } } return $retvalue; //return value } //end function -----Original Message----- From: Joanna [mailto:joanna@blackhole.evilgeeks.com] Sent: Monday, July 17, 2000 11:02 AM To: php-db@lists.php.net Subject: [PHP-DB] mysql and php I have a db with a simple table. One of the fields in the tables are fruit. I created a HTML SELECT FORM to select what kind of fruit,apples,peaches,ect... I would like to input the kind of fruit into the table. I have even tried using php ifelse statements to assign integers instead of the actual fruit name and I still can't figure it out. Can someone please help. The thing I can't figure out is how to know which of the choices have been selected from the form. thanks -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net For additional commands, e-mail: php-db-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.db (#1197) next »