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

is_dir() problem
Hello,

I'm buidling a php scripts that dynamically get's subfolders from a specific folder.

Calculating a rating by adding number of points and dividing by number of items
I have a site that users can post links to files to download. They can rate these files on a 1-5 sca

CURL question
i am wondering if it's possible to use multi curl with login something like

login once to web

DOMDocument parsing
Hello, I am parsing an xml file from an API which I have converted into a DOMDocument in php. This i

Help with Password Encoding/Decoding?
Trying to design a "change password" tool. On my signup code I'm using base64_encode, now

How can I get my program to read a larger array ??
Hi:

I have this program that reads from an array to do calculations. The array are just t

have trouble in a if condition
The if below is working ok, it check when indexes, name, zipcode and state are empty.
Code: &

Create or replace package is ending ORA-21700
Database 9.2.0., patch 8 (9.2.0.8.0).
I trying run
create or replace package ....etc.

New Login Script
Hi all, i attempted to create a whole new login script witch isnt working for some reason i dont kno

how do i display data on a page from mysql
1 - do i use this code at the top of each of my page i wish to only alow access if there as been a s

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