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

Session login issue
I'm wondering how to fix a problem I'm having with a session-based login system

Say I go to h

PHP Cannot redeclare class
I have 6 files, and two of them do not seem to want to play well. I keep getting a "Cannot rede

mysql timestamp manipulation
How could I use a timestamp (e.g 2009-10-30 13:20:35 ), and with php find out if it is:

from

Is it possible to put an entire 500-page book in a database with PHP?
I am working on an intranet and I was wondering if its possible to code php with mysql to enter a fu

help with variable
I've got a problem, i want to echo some images depending on the $id, however for me to get that id i

file downloaded can't be read !!
<?php
$fileName = 'mypic.jpg';
$mimeType = 'image/jpeg';
header('content-dispositio

About imagecopyresampled()
Hello,

I am looking to use this function to resize parts of an image to a fixed thumbnail siz

problem with query error
First Thanks to those who helped me on my previous posts, and the following code i'm using is not mi

The IE or FF detector
Hello Friends,

Problem of today ( we seek for php help ) as following ,

we know all th

session_destroy();
new to php
I have a simple login and am trying to write a logout.
I set a $_SESSION var to 1 i

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