pixeltrace Posted March 6, 2006 Share Posted March 6, 2006 guys,kindly check[a href=\"http://www.sinagtala.net/sinag3/submitfeedback.php\" target=\"_blank\"]http://www.sinagtala.net/sinag3/submitfeedback.php[/a]i am having problems with fixing the pulldown menu in the events title section. hope you could help me with it.this is the script that i used for that section================== <? include 'db_connect.php'; $uSql = "SELECT event_title FROM events ORDER by event_date DESC"; $uResult = mysql_query($uSql, $connection); if(!$uResult){ echo 'no data found';}else{ while($uRow = mysql_fetch_row($uResult)){ ?> <select name="title" size="1" class="sorteventlist"> <option selected><?= $uRow[3]?></option> <? } }?> </select> ==================what's wrong with this?thanks in advance! Quote Link to comment Share on other sites More sharing options...
craygo Posted March 6, 2006 Share Posted March 6, 2006 You are putting the select in the loop. It has to go outside your loop and just put in the info[code]<select name="title" size="1" class="sorteventlist"><?$uSql = "SELECT event_title FROM events ORDER by event_date DESC";$uResult = mysql_query($uSql, $connection);if(!$uResult){echo 'no data found';} else {while($uRow = mysql_fetch_array($uResult)){?><option value="<?=$uRow['event_title']?>" selected><?= $uRow['event_title]?></option><?}}?></select>[/code]I forget weather you need the value or not so I added it.Ray 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.