dwex Posted January 24, 2011 Share Posted January 24, 2011 the same page? Quote Link to comment Share on other sites More sharing options...
litebearer Posted January 24, 2011 Share Posted January 24, 2011 Perhaps a little deeper explanation would help. Based upon what you have posted, why not store the various values into an array? Quote Link to comment Share on other sites More sharing options...
mike12255 Posted January 24, 2011 Share Posted January 24, 2011 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"; } ?> Quote Link to comment Share on other sites More sharing options...
dwex Posted January 24, 2011 Author Share Posted January 24, 2011 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> Quote Link to comment Share on other sites More sharing options...
mike12255 Posted January 24, 2011 Share Posted January 24, 2011 is it inside a <form> if it is, then the variable for it once the forum is sent would be $_POST['quantity'] Quote Link to comment Share on other sites More sharing options...
dwex Posted January 24, 2011 Author Share Posted January 24, 2011 thanks for the reply. Nevermind, it's kinda hard to explain this 1. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.