Re: FORM -> SELECT etc
| From: | Brian Clark | Date: | Sat, 11 Nov 2000 13:36:24 +0000 |
| Subject: | Re: FORM -> SELECT etc | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-24780@lists.php.net to get a copy of this message | ||
Siim Einfeldt aka Itpunk wrote:
Take a look at the following: <SELECT name='something'> <OPTION value='".$eeter["veelalles"]."'>Järele jäänud näitamiskordi\n <OPTION value='".$asukoht["showtime"]."'>Programmis saabumine\n </SELECT> First I have to say that this is only a short version of the code, the arrays are there with the reason. Now, what I need to do, is to check which one was chosen, I need to know whether it was $eeter array,<form method="post"> <select name="b"> <option value="Stuff"<?php print $b == 'Stuff' ? ' selected' : ''; ?>>Stuff</option> <option value="Junk"<?php print $b == 'Junk' ? ' selected' : ''; ?>>Junk</option> </select> <input type="submit"> </form>
$asukoht array or something else and when i know it, I want to get the value, 'veelalles' for example.'veelalles' in $eeter["veelalles"] is the key, not the value, but... <?php $eeter['veelalles'] = 'something'; while(list($key,) = each($eeter)) {
print $key;} ?>
Im sure it must be easy, but I just cant figure it out myself right
now...even wihout a rought night...
So has any ideas?
How to mix the two together is left up to you.
Thanks, Siim Einfeldt-Brian