Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_php thread: Re:_[pro_php]_RE:_[pro_php]_How_cantī_read_the_names_and_values_off_a_combo-box


Message #1 by =?iso-8859-1?q?Julio=20Oliveira?= <oliveira_julio@y...> on Fri, 22 Jun 2001 11:37:33 +1000 (EST)
Muchas thank you .
your are a campeon for mi

saludos 
Julio Oliveira

--- Joel Wickard <jwickard@l...> wrote: > 
> Richard   this is joel.... I lost your email
> address, send an email to my
> box jwickard@l... so I can mail you
> again
> ----- Original Message -----
> From: "Richard D. Williams" <appgrp@e...>
> To: "professional php" <pro_php@p...>
> Sent: Thursday, June 21, 2001 2:42 PM
> Subject: [pro_php]
>
RE:_[pro_php]_How_cantī_read_the_names_and_values_off_a_combo-box
> 
> 
> >
> > Ola Julio,
> >
> > Yoor english is very good. I had the same problem
> when I started with php.
> > Here is a sample of the code for a drop box
> selection.
> >
> > <center><b>Choose an ISD from the list
> provided:</b><br>
> > <?php
> > require 'common.inc';
> > mysql_select_db($database) or die("Unable to
> select $datbase");
> > echo ("<FORM METHOD='post' ACTION='page3.php3'>");
> > echo ("<SELECT NAME='myisdsel' SIZE='1'>");
> > $query = "SELECT * FROM isd ORDER BY isd_name";
> > $links = mysql_query($query) or die("<font
> color=red>Insert Failed!
> error-"
> >
> > . mysql_error() . "<br>\nquery - $query</font>");
> > while ($myisd = mysql_fetch_array($links))
> > {
> >         $isd_name = $myisd["isd_name"];
> >         $id = $myisd["isd_id"];
> >         echo "<OPTION
> VALUE=$id>$isd_name</OPTION>\n";
> > }
> > echo "(</SELECT><br>");
> > ?>
> > <INPUT TYPE="submit" VALUE="Submit">
> > </CENTER>
> > </FORM>
> >
> > Explaination:
> >
> > MySQL table:     isd
> > Fields retrieved from query:    $id    $isd_name
> > The $id of the selected item is stored in the
> select name, $myisdsel.
> > This can be used in the next page,
> ACTION='page3.php3'
> >
> > If you need to place a specific item in as the
> first on the list. You can
> > add something like this;
> > if ($id = = $somevalue)
> > {
> > echo ("<OPTION VALUE='$clssub'
> SELECTED>$subname</OPTION>\n");
> > }
> >
> > I hope this helps. I am just passing on what
> someone else taught me.
> >
> > Richard D. Williams
> >
> >
> > Julio Oliveira wrote:
> >
> > > Hi
> > > your spanish is better than my english
> > >
> > > Donīt worry i understand english from 40 years
> ago,
> > > but i donīt write very good.
> > >
> > > This is the problem.
> > >
> > > Iīm doing a web e-commerce.
> > > I have the client at the browser, and he has to
> do the
> > > new client.
> > >
> > > Name ....  julio
> > > direc....  Gaona 3456 -
> > > city ................  (hear the problem)
> > >
> > > He has to select from a list
> > >
> > > Buenos Aires
> > > Capital
> > > New York
> > >
> > > I donīt want he see the numbers off the city
> that are
> > > at the server (mysql - table)
> > >
> > > At mysql-table i have a number like the key
> > >
> > > 0001BuenosAires  ( a number and the first six
> > > elements)
> > >                   and the last six elements for
> > > security)
> > >
> > > When i take the listbox at the browser i donīt
> like to
> > > see the numbers off the key. He only see the
> names.
> > >
> > > When he take one at the browser, like Buenos
> Aires, y
> > > see that at the text in the browser, but i have
> to put
> > > the number at the table off the client.
> > >
> > > I do that with clipper at dos without problem.
> > >
> > > Canīt i have an array bidimensional (name and
> number)
> > > and see only the name at the listbox in the
> browse.
> > >
> > > Sorry by the lata (charla muy larga)
> > > contestame en ingles o en espaņol, si es espaņol
> mejor
> > > para que tu pratiques.
> > >
> > > Muchas gracias por tu tiempo
> > >
> > > Saludos
> > > Julio Oliveira - Buenos Aires - Argentina.
> > >
> 

  Return to Index