From: andy amol
I am using the following code, but it is not populating my script. If
you can help I would be grateful.
I am using mysql as database.
?
$sql = SELECT course_id FROM course;
$sql_result = mysql_query($sql)
or die(Couldn't execute query.);
while ($row =
hi,
I would like to know how to create and populate drop down boxes in php.
I want the value to be populated from database.
What I am try to do is to provide the forign key value as combo box option, so that I
do not have to check for referential integrity.
Thanks in advance.
hi,
I would like to know how to create and populate drop down boxes in php.
I want the value to be populated from database.
What I am try to do is to provide the forign key value as combo box option, so that I
do not have to check for referential integrity.
Also if you can help me with a
I use html forms with select field size 1 and the option values and/or
what is supposed to appear in the box. This you populate by your DB
query, maybe using an array and a loop (from 0 to ..).
Torsten
andy amol schrieb:
hi,
I would like to know how to create and populate drop down boxes in
You mean select/select html dropdown-s?
print 'select name=sg';
$r = mysql_query(SELECT id, field1, fieldn FROM table WHERE fieldn = 'sg');
while($RESULT = mysql_fetch_array($)) {
print 'option value='.$RESULT['id'].''.$RESULT['fieldn']'./option';
}
print '/select';
Validating: just check
From: andy amol [EMAIL PROTECTED]
I would like to know how to create and populate drop down boxes in php.
I want the value to be populated from database.
What I am try to do is to provide the forign key value as combo box
option, so that I do not have to check for referential integrity.
variable. On the pages that include this one is where the
displaying comes out.
HTH,
Robert
-Original Message-
From: andy amol [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 20, 2004 11:53 AM
To: David Robley; [EMAIL PROTECTED]
Subject: [PHP-DB] Drop-down box in php
hi,
I would like
hi,
I am using the following code, but it is not populating my script. If you can help
I would be grateful.
I am using mysql as database.
?
$sql = SELECT course_id FROM course;
$sql_result = mysql_query($sql)
or die(Couldn't execute query.);
while ($row = mysql_fetch_array($sql_result))
Jsut a guess...
Your row has a capital 'A' in the SQL statement, and a lower case 'a' in
teh $row[] call..
does that matter?
Larry Sandwick [EMAIL PROTECTED]
22/01/2004 15:46
Please respond to
[EMAIL PROTECTED]
To
[EMAIL PROTECTED]
cc
Subject
[PHP-DB] Drop down box NOT populated
From: [EMAIL PROTECTED]
Jsut a guess...
Your row has a capital 'A' in the SQL statement, and a lower case 'a' in
teh $row[] call..
does that matter?
Yep, that would matter, but not the exact problem. I don't know if this
thread has already been answered or not, so...
The real problem is
: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Drop down box NOT populated
From: [EMAIL PROTECTED]
Jsut a guess...
Your row has a capital 'A' in the SQL statement, and a lower case 'a'
in teh $row[] call..
does that matter?
Yep, that would matter, but not the exact problem. I don't know
From: Humberto Silva [EMAIL PROTECTED]
Instead of:
$row = mysql_fetch_array($sql)
Use:
$row = mysql_fetch_assoc($sql)
While I'm in the habit of doing that, using fetch_array() isn't going to
cause any problems with regard to the original post. Which one you use is
really a matter of
-DB] Drop down box NOT populated
From: Humberto Silva [EMAIL PROTECTED]
Instead of:
$row = mysql_fetch_array($sql)
Use:
$row = mysql_fetch_assoc($sql)
While I'm in the habit of doing that, using fetch_array() isn't going to
cause any problems with regard to the original post. Which one you
Can anyone tell me what
I am missing here,
The Select statement
does not populate my drop down window?
My drop down box is empty !
[snip]
?
include '../db.php';
$how = mysql_query(SELECT count(distinct(account))
from Backlog) or die (Something bad happened: .
Larry Sandwick wrote:
Can anyone tell me what I am missing here,
The Select statement does not populate my drop down window?
My drop down box is empty !
?
include '../db.php';
$how = mysql_query(SELECT count(distinct(account)) from Backlog) or
die (Something bad happened: . mysql_error());
- Original Message -
From: Larry Sandwick
To: [EMAIL PROTECTED]
Sent: Thursday, January 22, 2004 3:46 PM
Subject: [PHP-DB] Drop down box NOT populated
Can anyone tell me what I am missing here,
The Select statement does not populate my drop down window?
My drop
How do I get my select form to select a value for $num_view and refesh the
page?
SELECT * FROM table_name ORDER BY n_id DESC LIMIT $num_view
I now need a dropdown box that has set values for 5,10,15 and 20 so that the
user can select a number of news articles to view and it will refresh the
From: Ben Cairns [EMAIL PROTECTED]
To: php-db [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Drop down box
Date: Thu, 1 Mar 2001 14:06:21 +
Hope this helps
-- Ben Cairns - Head Of Technical Operations
intasept.COM
Tel: 01332 365333
Fax: 01332 346010
E-Mail: [EMAIL PROTECTED]
Web: http
The action you want is only available using JavaScript.
You need to submit the form without a submit button.
The "select" tag has the "OnChange" event which is scriptable. You
can use the JavaScript statement "this.form.submit();" associated
with the "OnChange" event.
form... select
At 06:32 PM 3/1/2001 -0300, you wrote:
The action you want is only available using JavaScript.
True but the action *you* want is most definitely not what many of your
*users* are going to want. If you use Javascript this way your site will
be un-navigable if Javascript is turned off or the
interface
with less "clicks"? May be we can reach another interface approach which
turn it possible.
Jayme.
-Mensagem Original-
De: Ron Brogden [EMAIL PROTECTED]
Para: [EMAIL PROTECTED]
Enviada em: quinta-feira, 1 de maro de 2001 18:48
Assunto: Re: [PHP-DB] Drop down box
A
21 matches
Mail list logo