RE: [PHP] Drop down Menu

2002-10-08 Thread Wilmar Perez

This is a function I made which covers my needs.  May be of some help for 
you.  This is a "select" box but I'm sure you can modify it for a combo box.

$form_fiel_name is the name you want the box to have in your web form.
$table is the table from you want to retrieve the information
$field is the specific field from the table
$kind could be simple or multiple

function show_list_field($form_field_name, $table, $field, $kind)
{
$list_result = "";
$list_result .= "";
$query = "select $field from $table";
$result = mysql_query($query) or die($mysql_error());

while($row = mysql_fetch_array($result))
{
$list_result .= "".htmlspecialchars(stripslashes($row["$field"]))."";
}

$list_result .= "";

return $list_result;
}


Hope it helps
***
 Wilmar Pérez
 Network Administrator
   Library System
  Tel: ++57(4)2105145
University of Antioquia
   Medellín - Colombia
  2002
***
 
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Drop down Menu

2002-10-08 Thread Liam . Gibbs

<>

Well, to start you off, the select would have to be this:
SELECT salesman FROM salesman_database;
(You may have to check out a MySQL site for some specifics, such as what
other information do you need than the name--number? Department?--and are
there any filters you need--some have left?).

For the rest of it (as in how do you make your results into a dropdown list)
that's not a PHP question. You can spit it out by doing a
mysql_query/fetch_mysql_row combo, but that will be a straight HTML list.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Drop Down Menu

2001-07-28 Thread Michael J. Seely

You need to do something like this:
With a little PHP work you can make the menu content and url links data driven.




Page Title














  Menu Options   

Back    

Select Section          
Page 1
Page 2
Page 3





2/1/2001






>I have the following question : if i make a selection in the drop down menu
>and click on submit button then the color will send to form2.php
>I want not click on the submit button
>i make a selection in the drop down menu then the color will send automatic
>to form2.php, how can I do this
>
>
>
>   
>   blue
>   licht
>   red
>   yellow
> 
>
>
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
Michael Seely  408-777-9949




 


Re: [PHP] Drop Down Menu

2001-07-28 Thread Gianluca Baldo

It's a javascript issue.


   
   blue
   licht
   red
   yellow
 
 
 

Cheers,
   Gianluca

MV> I have the following question : if i make a selection in the drop down menu 
MV> and click on submit button then the color will send to form2.php
MV> I want not click on the submit button
MV> i make a selection in the drop down menu then the color will send automatic
MV> to form2.php, how can I do this


MV> 
MV>   
MV>   blue
MV>   licht
MV>   red
MV>   yellow
MV> 
MV> 
MV> 






--
ALBASOFTWARE
C/ Mallorca 186 - 3º 1ª
08036 Barcelona (Spain)
Tel. +34 93454009 - +34 934549324
Fax. +34 934541979
@@ ICQ 47323154 @@
[EMAIL PROTECTED]
http://www.albasoftware.com
http://www.phpauction.org
http://www.gianlucabaldo.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] drop-down menu variables

2001-04-05 Thread Joe Stump

You should all check out libHTMLForm at http://www.nirvani.net/software - it
has all sorts of functions for writing HTML forms easily and painlessly. I use
it all the time now (shameless plug - my roommate wrote it a while back).

--Joe

On Fri, Apr 06, 2001 at 02:35:11AM +0200, Richard wrote:
> You must set:
> 
> some text
> 
> 
> if it's a SELECT list. Use  to set an initialized text.
> 
> Use .VALUE to check if it's empty or not... But beware, sometimes it forgets
> the contents... If you would use the JavaScript "alert(text)" function...
> 
> 
> - Richard
> ""Joao Monteiro"" <[EMAIL PROTECTED]> wrote in message
> 9aahf3$bph$[EMAIL PROTECTED]">news:9aahf3$bph$[EMAIL PROTECTED]...
> > when i edit variables with a form the ones wich are simple text get
> > corrected ok, but the ones chosen from drop-down menus only get added to
> > existing variables...
> > what am i doing wrong?
> >
> > Thanx
> >
> > Joao Monteiro
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


/**\
 *Joe Stump - PHP/SQL/HTML Developer  *
 * http://www.care2.com - http://www.miester.org - http://gtk.php-coder.net   *
 * "Better to double your money on mediocrity than lose it all on a dream."   * 
\**/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] drop-down menu variables

2001-04-05 Thread Richard

You must set:

some text


if it's a SELECT list. Use  to set an initialized text.

Use .VALUE to check if it's empty or not... But beware, sometimes it forgets
the contents... If you would use the JavaScript "alert(text)" function...


- Richard
""Joao Monteiro"" <[EMAIL PROTECTED]> wrote in message
9aahf3$bph$[EMAIL PROTECTED]">news:9aahf3$bph$[EMAIL PROTECTED]...
> when i edit variables with a form the ones wich are simple text get
> corrected ok, but the ones chosen from drop-down menus only get added to
> existing variables...
> what am i doing wrong?
>
> Thanx
>
> Joao Monteiro
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]