aldm Posted August 24, 2009 Share Posted August 24, 2009 Hi, I'm building one application with HTML, CSS and PHP. In this web application, I have a form for creating new member and form with list of members, where member should be selected from the "select" element in html form, and then informations about that member can be viewed. How can I add member's name and surname to "select" when I'm creating him, on form for view member's profile? Thanks in advance Quote Link to comment Share on other sites More sharing options...
haku Posted August 24, 2009 Share Posted August 24, 2009 You will need to use php to get the member's list from your database, then build the select element with php. Quote Link to comment Share on other sites More sharing options...
robert_gsfame Posted September 23, 2009 Share Posted September 23, 2009 <?php //first you have to know really about mysql and php //connect to your database and don't forget user session //get your data using fetch array based on user session //Let say that your array is being stored inside '$array' $myrecordfromdatabase = $array['record_kept_in_database']; ?> <select name="choose"><option value='check1' <?php if($myrecordfromdatabase=='check1'){ echo "SELECTED";}else{ }> hope it could give you some hints 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.