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

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

include problem
I have my root folder as:
Code: $root = $_SERVER["SITE_HTMLROOT"]; // the server root<

array_diff weirdness
I'm using the following bit of code

$diff = array_diff($pids, $pidlist);
$diff = array_va

PHP Thumbnail Creation
Ok so i use this function to create thumbnails:

Code: [Select]function createthumb($name,$fil

whats wrong with my code please help!!!
this is the error


Warning: mysql_close(): supplied argument is not a valid MySQL-Link res

Simple program to copy files between two computers over the web
I use logmein free and often need to move files between my two computers. Generally, I move the file

PHP, Arrays & A Lot Of Confusion
I've been doing basic PHP work on sites for a few years now, but I've never been tempted to learn ho

Paypal
Hi all,

I have an advanced basic knowledge of php

I want to try something new for a s

Struct/union and scope problem!
HI all , I have
Code: in header.h typedef struct Node Link; /* ---------

Problem with "dynamic" index page
Hi. I have one question. In my index.php page I have this kind of code:
Code: // listaa sivut

compile php5 with DOM
Hi,

I can't manage to compile php 5.3.0 from source on Windows to include DOM,
in spite of

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