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

How to schedule the a job?
Hi,
I have prepared a task ( i.e. a procedure is prepare the file and send the same to con

Regular expression tips or resources
Hello! I'm having some issues implementing the appropriate regex patter to eliminate unwanted charac

Add_Months not Easy to Understand
Oracle is number 1, very fast and very easy. But....
OK, I think but have a problem, only 1 pro

Procedural to OOP
ohn Kleijn said that to avoid writing "crappy code", we should learn OOP and common OO pri

Working with popups and such in a class
I've recently started building my applications completely enclosed in classes. I like the fact that

do while conditions
i want to display 6 images in a 2x3 table
now what would be the correct logic to
count that th

Limiting uploaded file type
Hi. First post here
I am working on a simple upload script, and I need it to limit the allowed f

Regarding accessing SQL query issued by any user in Oracle 10g
Hi all,
i want to know the queries issued by various users accessing a database...

Beginner question regarding Array's
Hi everyone, the page im working on has an array of variable at the top...

Code: $define_li

Accept only alpha characters
I've got this bit of code ready for accepting a phrase:

Code: if (!eregi ("", $_POS

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