Jump to content

how to store the value of a select drop down menu into a variable within


dwex

Recommended Posts

I can be sure what you are looking for, but I think its something like this:

 

<?php
$queury = "SELECT * FROM test";
$res = mysq_query($query) or die (mysql_error())
while ($row = mysql_fetch_array($res)){
echo "<option value = $row['id']>".$row['name']."</option";
}

 

?>

thx for the replies.

 

I wanna store the value of the quantity select drop down box into a variable.

 

<td valign="top"><b>Quantity: </b> 
			<select name='quantity'>
				<?php
			for($i=1; $i<=$stk; $i++){
     			echo '<option name="$i[]">';
 				echo $i;
 			echo '</option>';
			}
			?>	</select></td>

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.