jarv Posted March 29, 2011 Share Posted March 29, 2011 Hi, I am doing an EDIT user page and would like to check records with a dropdown and then set as selected, please help! <select name="BrokerID" class="small-input"> <option value="Please select an option">Please select a Broker</option> <?php while($row2 = mysql_fetch_array($broker)) { echo '<option name="BrokerID" value="'.$row2['BrokerID'].'">'.$row2['BrokerName'].'</option>'; } ?> </select> Link to comment https://forums.phpfreaks.com/topic/232023-check-if-dropdown-option-matches-and-select/ Share on other sites More sharing options...
jarv Posted March 29, 2011 Author Share Posted March 29, 2011 I just need to check if $row2['BrokerName'] = $row1['BrokerName'] then SELECTED Link to comment https://forums.phpfreaks.com/topic/232023-check-if-dropdown-option-matches-and-select/#findComment-1193579 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.