czukoman20 Posted December 17, 2007 Share Posted December 17, 2007 <tr><td>Type of Market:</td> <td><label> <select name="type_market" id="type_market"> <option value="stocks">Stocks </option> <option value="commodities">Commodities</option> <option value="education">Education</option> <option value="planning">Planning</option> <option value="morgage_broker">Morgage broker</option> </select> </label></td> That is my list form ... i am wondering how could i make it so when the user goes to edit account.. how can i make it so it echos $req_user_info['type_market']; (market type variable that i created) and display that area of the drop down menu ? for example how you have for a text field <tr><td>Comments To the Banner owners. :</td><td><textarea name="comments" cols="40" rows="5"> <? echo $req_user_info['comments']; ?></textarea></td><td><? echo $form->error("comments"); ?></td></tr> <tr><td colspan="2" align="right"> <? echo $req_user_info['comments']; shows what the user already has in their database thanks Quote Link to comment Share on other sites More sharing options...
czukoman20 Posted December 17, 2007 Author Share Posted December 17, 2007 Do u guys understand what im trying to do Quote Link to comment Share on other sites More sharing options...
~n[EO]n~ Posted December 17, 2007 Share Posted December 17, 2007 Is this what you are looking for ? <?php $type_market = $req_user_info['type_market']; ?> <select name="type_market" id="type_market"> <option value="stocks" <?php if($type_market=="stocks") echo "selected"; ?>>Stocks </option> <option value="commodities" <?php if($type_market=="commodities") echo "selected"; ?>>Commodities</option> <option value="education" <?php if($type_market=="education") echo "selected"; ?>>Education</option> <option value="planning" <?php if($type_market=="planning") echo "selected"; ?>>Planning</option> <option value="morgage_broker" <?php if($type_market=="morgage_broker") echo "selected"; ?>>Morgage broker</option> </select> 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.