>You may already be doing it like this, but I think I found a new way to
>make select boxes auto-select (what data they put in) a lot easier. All you
>have to do is put a variable in each select tag that is equal to the value
>of the select option i.e.: <option value=teacher $teacher> -- then all you
>have to do is base the variable on that <select name=interest> $$interest =
>"selected"; quick and easy with out having to loop through an if elseif
>statement. Let me know if you like that method or have any objections.
Since I'm always looping through choices in my database, and not hard-coded
values, it's really no trouble to do:
while ($id = ...){
$selected = $id == $previously_selected_id ? 'SELECTED' : '';
echo "<OPTION VALUE=$id $selected>...</OPTION>\n";
}
If I *really* want hard-coded options, I'll just put them in an array and do
the above.
--
Like Music? http://l-i-e.com/artists.htm
I'm looking for a PRO QUALITY two-input sound card supported by Linux (any
major distro). Need to record live events (mixed already) to stereo
CD-quality. Soundcard Recommendations?
Software to handle the recording? Don't need fancy mixer stuff. Zero (0)
post-production time. Just raw PCM/WAV/AIFF 16+ bit, 44.1KHz, Stereo
audio-to-disk.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php