thefollower Posted December 4, 2007 Share Posted December 4, 2007 Is it possible to add a while loop inside a html box to print out the options for the user.. this is what i got and ill explain what i mean below: <?php $Check = mysql_query("SELECT * FROM countryusercoords WHERE CountryID='$CountryID'") or die(mysql_error()); $CheckRow = mysql_fetch_assoc($Check); If(mysql_num_rows($CheckRow) > 0){ ?> <form name="" method="POST" action="uktravelattack.php" id="Form1" onsubmit="return ValidateForm1(this)"> <textarea name="TextArea1" id="TextArea1" style="position:absolute;left:49px;top:53px;width:440px;height:250px;z-index:0" rows="14" cols="46"> </textarea> <input type="submit" id="Button1" name="Button1" value="Attack" style="position:absolute;left:217px;top:347px;width:75px;height:24px;z-index:1"> <input type="checkbox" id="Checkbox1" name="Checkbox1" value="" style="position:absolute;left:319px;top:348px;z-index:2"> <div id="bv_Text9" style="position:absolute;left:56px;top:352px;width:150px;height:16px;z-index:3" align="center"> <font style="font-size:13px" color="#FFFFFF" face="Arial"><i>Costs 50 Energy!</i></font></div> </form> Regarding: <textarea name="TextArea1" id="TextArea1" style="position:absolute;left:49px;top:53px;width:440px;height:250px;z-index:0" rows="14" cols="46"> </textarea> Is there a way to add a while loop for that query so that it will print the rows... and then that allows the user to select which row they want and then when they press submit it will carry that row to the process page? Quote Link to comment Share on other sites More sharing options...
PHP_PhREEEk Posted December 4, 2007 Share Posted December 4, 2007 The short answer is, of course, yes... The longer answer is, if we populate a text area with all of the data, they won't be able to select one piece of that data. Instead, they would have to delete all of the data they don't want, leaving the one thing they do want. A better idea here, if you want them to be able to select one thing, is to either provide the data in a drop-down, or as separate radio button items. PhREEEk 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.