Re: dynamic form

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 3/15/06, Mark <neretlis@xxxxxxxxxxxxxx> 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/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux