A better way to do this

From: Date: Sun, 23 Oct 2005 19:23:25 +0000
Subject: A better way to do this
Groups: php.general 
Request: Send a blank email to php-general+get-224522@lists.php.net to get a copy of this message
I want the selct table to retain it's value on submit. The way I have done it works but is a bit rubbish and was wondering if there is a more efficient way. I just make the variable equal to "selected" when the form is submitted <select name="table_name" id="table_name"> <option value="1" <?=$one; ?>>Please Select</option> <option value="news" <?=$two; ?>News</option> <option value="events" <?=$three; ?>Events</option> <option value="publications" <?=$four; ?>Publications</option> </select> Thanks, R.

« previous php.general (#224522) next »