Countries in a select field

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts

  • Rudolf Horbas
    Guest replied
    Re: Countries in a select field

    Fred H wrote:
    [color=blue]
    > På Thu, 26 Feb 2004 08:06:13 -0800, skrev Scott Castillo <scasti2@cox.ne t>:
    >[color=green]
    >> I have Countries in a drop-down list. (...)[/color]
    >
    >
    > This is *so* OT. This is HTML. Ask a HTML group.[/color]

    He's not reading the variables with html, right?

    IMO form processing and creation ain't OT.

    Rudi

    Leave a comment:


  • Scott Castillo
    Guest replied
    Re: Countries in a select field

    Thank you very much.

    "Ash Argent-Katwala" <ash@videdot.co m> wrote in message
    news:Pine.LNX.4 .58.04022615180 60.32123@gauss. doc.ic.ac.uk...[color=blue]
    > On Thu, 26 Feb 2004, Pedro Graca wrote:[color=green][color=darkred]
    > >> Any countries with more than one word are not captured properly in form
    > >> variables. Only the first word is captured to the variable. So, for
    > >> instance, if 'British Virgin Islands' is selected, only 'British'[/color][/color][/color]
    is[color=blue][color=green][color=darkred]
    > >> captured to the form variable.[/color]
    > >You have to surround the value with quotes
    > >Try this:[/color]
    > <snip>[color=green]
    > > <option>one two three</option>
    > > <option value="four five six">four five six</option>
    > > <option value=seven eight nine>seven eight nine</option>[/color]
    > <snip>
    >
    > Or, if you really do want to have the content of the element sent back,[/color]
    just[color=blue]
    > omit the 'value' attribute on option.
    >
    > --
    > ash
    > a-k
    > ... If she doesn't scare ya, no evil thing will...
    >[/color]


    Leave a comment:


  • Scott Castillo
    Guest replied
    Re: Countries in a select field

    Thank you very much.

    "Pedro Graca" <hexkid@hotpop. com> wrote in message
    news:c1l2fg$1jf 775$1@ID-203069.news.uni-berlin.de...[color=blue]
    > Scott Castillo wrote:[color=green]
    > > I have Countries in a drop-down list.
    > >
    > > Any countries with more than one word are not captured properly in form
    > > variables. Only the first word is captured to the variable. So, for
    > > instance, if 'British Virgin Islands' is selected, only 'British' is
    > > captured to the form variable.[/color]
    >
    > You have to surround the value with quotes
    >
    > Try this:
    >
    > #v+
    > <?php
    > echo <<<HTML
    > <form action="" method="post">
    > <select name="x">
    > <option>one two three</option>
    > <option value="four five six">four five six</option>
    > <option value=seven eight nine>seven eight nine</option>
    > </select>
    > <input type="submit"/>
    > </form>
    > HTML;
    >
    > echo '<pre>'; print_r($_POST) ; echo '</pre>';
    > ?>
    > #v-
    > --
    > --= my mail box only accepts =--
    > --= Content-Type: text/plain =--
    > --= Size below 10001 bytes =--[/color]


    Leave a comment:


  • Fred H
    Guest replied
    Re: Countries in a select field

    På Thu, 26 Feb 2004 08:06:13 -0800, skrev Scott Castillo <scasti2@cox.ne t>:
    [color=blue]
    > I have Countries in a drop-down list. (...)[/color]

    This is *so* OT. This is HTML. Ask a HTML group.

    --
    Fred H

    void FredH::Contact( ) {
    TextToSpeach.sa y("frode at age dee dee dot en oh");
    }

    Leave a comment:


  • Ash Argent-Katwala
    Guest replied
    Re: Countries in a select field

    On Thu, 26 Feb 2004, Pedro Graca wrote:[color=blue][color=green]
    >> Any countries with more than one word are not captured properly in form
    >> variables. Only the first word is captured to the variable. So, for
    >> instance, if 'British Virgin Islands' is selected, only 'British' is
    >> captured to the form variable.[/color]
    >You have to surround the value with quotes
    >Try this:[/color]
    <snip>[color=blue]
    > <option>one two three</option>
    > <option value="four five six">four five six</option>
    > <option value=seven eight nine>seven eight nine</option>[/color]
    <snip>

    Or, if you really do want to have the content of the element sent back, just
    omit the 'value' attribute on option.

    --
    ash
    a-k
    .... If she doesn't scare ya, no evil thing will...

    Leave a comment:


  • Pedro Graca
    Guest replied
    Re: Countries in a select field

    Scott Castillo wrote:[color=blue]
    > I have Countries in a drop-down list.
    >
    > Any countries with more than one word are not captured properly in form
    > variables. Only the first word is captured to the variable. So, for
    > instance, if 'British Virgin Islands' is selected, only 'British' is
    > captured to the form variable.[/color]

    You have to surround the value with quotes

    Try this:

    #v+
    <?php
    echo <<<HTML
    <form action="" method="post">
    <select name="x">
    <option>one two three</option>
    <option value="four five six">four five six</option>
    <option value=seven eight nine>seven eight nine</option>
    </select>
    <input type="submit"/>
    </form>
    HTML;

    echo '<pre>'; print_r($_POST) ; echo '</pre>';
    ?>
    #v-
    --
    --= my mail box only accepts =--
    --= Content-Type: text/plain =--
    --= Size below 10001 bytes =--

    Leave a comment:


  • Scott Castillo
    Guest started a topic Countries in a select field

    Countries in a select field

    I have Countries in a drop-down list.

    Any countries with more than one word are not captured properly in form
    variables. Only the first word is captured to the variable. So, for
    instance, if 'British Virgin Islands' is selected, only 'British' is
    captured to the form variable.

    Any thoughts on why this is happening?

    Thanks,

    Scott


Working...