multiple record out put

From: Date: Mon, 26 Mar 2001 06:20:48 +0000
Subject: multiple record out put
Groups: php.general 
Request: Send a blank email to php-general+get-45581@lists.php.net to get a copy of this message
Hiya, I'm creating a page where the user can select multiple options to query the DB with i am at the moment i can't get more than 1 record to display from the db at all. If any one could offer soem suggestions i would be very grateful <? //db connect info above if ($Submit) { $rs = "SELECT * FROM machine WHERE avail='y' AND system='$system'"; $result = mysql_query($rs); $system = mysql_result($result, 0, 'system'); $serial = mysql_result($result, 0, 'serial'); $availe = mysql_result($result, 0, 'avail'); echo "$system $serial $avail"; } echo mysql_error(); ?> <form name="machine" method="get" action="<? echo $PHP_SELF;?> "> <table width="463" border="1"> <tr> <td width="21%">MODEL</td> <td colspan="2">Config</td> <td width="14%"> Available </td> <td width="12%">Weekly</td> <td width="14%">Monthly</td> </tr> <tr> <td width="21%"> <select name="system" size="3" multiple> <option value="sparc 5">Sparc 5</option> <option value="sparc 20">Sparc 20</option> <option value="ultra_1">Ultra 1</option> <option value="ultra 2">Ultra 2</option> <option value="ultra 5">Ultra 5</option> <option value="ultra 10">Ultra 10</option> </select> <input type="submit" name="Submit" value="Submit"> </td> </tr> </table> <br> <br> </form> Peter Houchin peterh@sunrentals.com.au ========================================================= _____ __ /\ /_/_/_\ / |_/ \ /_/_/_ __ __ __ __ / \ \_/_/_\ /_/ /_/ /_/ /_/ \ _ / ___\_\_\/ /_/_/_/ /_//\/_/ \_/ \/\_/ \_//_/_/ /_/_/_/ /_/ \/_/ v ________ ________________________________________ /_/_/_/_/ /_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ /_/_ _/_/ ______ __ __ /_/ ____ __ ______ /_/_/_/_/ /_/_/_/ /_/ /_/ /_/ /_/\_\ /_/ /_/_/_/ /_/ \_\ /_/ _/ /_//\/_/ /_/ /_/__\_\ /_/___ _\_\_\ /_/ \_\/_/_/_/ /_/ \/_/ /_/ /_/ \_\/_/_/_//_/_/_/ ========================================================= Telephone : (03) 9329 1455 Facsimile : (03) 9329 6755 ************* We rent the dot in .COM! **************

« previous php.general (#45581) next »