List/Menu Box


Posted on 16th Feb 2014 07:03 pm by admin

On an edit page when you want something to select what a user has previously selected from the database, how would you do this for a List/Menu box? The only way I know how is
Code: <?php echo $sel_subject['house_price']; ?>
This is what I have

Did you know?Explore Trending and Topic pages for more stories like this.
Code: <select name="propType" />
<?php echo $sel_subject['propType']; ?>
<option></option>
<option>House</option>
<option>Bungalow</option>
<option>Flat</option>
<option>Detached</option>
<option>Semi Detached</option>
<option>Terraced</option>
</select>

Also is it wrong to leave all the options on this page?
No comments posted yet

Your Answer:

Login to answer
277 Like 47 Dislike
Previous forums Next forums
Other forums

Coding question?
Hey guys, I have a quick question. If I want to make a way for people to pay for health in my game,

how do i make new line after *
First check this page here. and you see my report. Im pulling form a mysql db. I want to beable to m

help with mysql_error()
Hi,

I am trying to insert data into a table, but I am not able to insert it. I wanted to see

Sum of Values in an Array
This is probably really simple... but it's been years since I've written anything, so bare with me!<

php sessions,logouts & the bloomin back button!
Hi All,

I've got a cms that members can log into. When they logout, the session is destroyed,

help with contest script
I would like to code a contest script to my site but i don't know how. Could someone just give me pu

PHP error. Need help urgently
Hi,

I am programming a php site and have a problem that i just cant find out how to fix. When

Giving the below syntax error
Dear Experts,

I have used 2 buttons in gui status as display and cjhange.When the user wi

Structure Question - One Table or One Table Per Record Set?
I have a web app (mySQL and PHP) which allows people to create an item with up to 200 records which

Using system() and bringing back the results
I am aware that you can use system() within PHP to execute system commands, but I was wondering if t

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash