RE: can't output sql query with php code.

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

 



> <?php
>         echo '<select name="month" >\n';
>         $month_query = mysql_query("SELECT m_id, months FROM Month");
>         while ($r = mysql_fetch_array($month_query));

 
Remove the semi-colon at the end of the above line and it works like a charm.
 
>         {
>                 $v = $r["m_id"];
>                 $out = $r["months"];   
>                 echo "<option value=$v>$out</option>\n";
>         }
>         echo '</select>\n';
> ?>

-- 
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