According to the documentation http://php.net/manual/en/function.mysql-result.php
mysql_result takes 2 and an optional third parameter. The second parameter should be
the row number.
- Frank
> Hi, can some one please help me figure out why the value $device isn't being passed
>on out of the select box? i keep getting this message when i view the source
>
> Wrong parameter count for mysql_result() in D:\erentals/1.php on line 19
>
>
>
> <form name="select" method="post" action="1.php">
> <select name="device"><?
> $query ="SELECT DISTINCT device FROM 3backup";
> $result = mysql_query($query);
> $device = mysql_result($rs); // line 19
> while($row = mysql_fetch_array($result)){
> echo '<option value="'.$row[device].'">'.$row[device].'</option><br>';
> }
> ?>
> </select>
>
>
> <input type="submit" name="select" value="select">
> </form> <!-- end Select form-->
>
> <?
> echo mysql_error();?>
>
> <? if($select){
> ?>
>
> <!-- Update form start -->
>
>
> <?
> $foo = "SELECT * FROM 3backup WHERE device='$device' ORDER BY device";
>
> $result = mysql_query($foo,$db);
> //$result = mysql_db_query('test',$foo);
> echo "$foo";
> echo mysql_error();
> }
> ?>
>
> Peter Houchin
> [EMAIL PROTECTED]
> =========================================================
> _____ __ / /_/_/_\
>/ |_/ /_/_/_ __ __ __ __ / \_/_/_\ /_/ /_/ /_/ /_/
> \ _ /
> ___\_\_\/ /_/_/_/ /_//\/_/ \_/ \/\_/
> \_//_/_/ /_/_/_/ /_/ \/_/ v
> ________ ________________________________________
> /_/_/_/_/ /_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
> /_/_ _/_/ ______ __ __ /_/ ____ __ ______
> /_/_/_/_/ /_/_/_/ /_/ /_/ /_/ /_/\_\ /_/ /_/_/_/
> /_/ \_\ /_/ _/ /_//\/_/ /_/ /_/__\_\ /_/___ _\_\_/_/ \_\/_/_/_/ /_/ \/_/ /_/
>/_/ \_\/_/_/_//_/_/_/
> =========================================================
> Telephone : (03) 9329 1455 Facsimile : (03) 9329 6755
> ************* We rent the dot in .COM! **************
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]