Re: dynamic form
| From: | chris smith | Date: | Wed, 15 Mar 2006 10:11:16 +0000 |
| Subject: | Re: dynamic form | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-231927@lists.php.net to get a copy of this message | ||
On 3/15/06, Mark <neretlis@westnet.com.au> wrote:
> Can anyone help to make this form dynamic, at hte moment a user picks a
> round number from 1-22 but if that round is closed then sends them back to
> this page. Anyway of making the form show the current round (as in sports
> round fixtures) without adding another field to the table.
<snip>
> FIXTURES
>
> Field Type Null Default
> id int(11) No
> round char(2) No 0
> game int(11) No 0
> date text No
> home text No
> away text No
> winner text No
> draw text No
> closed char(1) No 0
> comp_id int(11) No 0
> margin int(11) No 0
Get the current round the same way from your other question:
$query = "select round from fixtures where comp_id='x' where
closed='0' order by round asc limit 1";
$result = mysql_query($query);
$row = mysql_fetch_assoc($result);
$current_round = $row['round'];
then use that to pre-select your dropdown list.
--
Postgresql & php tutorials
http://www.designmagick.com/