PHP and HTML form help
| From: | Dani Matielo | Date: | Sat, 10 May 2003 19:49:43 +0000 |
| Subject: | PHP and HTML form help | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-147144@lists.php.net to get a copy of this message | ||
Hello,
I have a problem that I can't figure how to solve. It's simple, I just
couldnt find how to do it.
Here is the problem:
<SELECT name=id_status id="id_status">
<?
$status = lista_status();
for($i=0; $i<sizeof($status); $i++) {
$statu = $status[$i];
?>
<option value="<?= $statu['id'] ?>">
<?= $statu['nome']?>
</option>
<? } ?>
</select>
lista_status() is a function that lists all the possible status. I just dont
know how to make the initially selected value the one that comes from the
database.
Thank you for your help,
Dani
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.476 / Virus Database: 273 - Release Date: 24/4/2003