Drop down menu in a PHP submit form

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

    Drop down menu in a PHP submit form

    Hi there,
    I am looking for any help with a form I am trying to make, one of the
    feilds I want it to be a drop down menu, so this part of the form has set
    values and nothing else.

    I have tried a few times too make this work, but I can never make it work, I
    can`t even seem to find help ojnline for this issue.

    If anyone here can geve me some code or point me in the way of a good
    tutorial I would be thankful for the help

    Bandit.


  • Ian.H

    #2
    Re: Drop down menu in a PHP submit form

    On Thu, 29 Jul 2004 07:44:44 -0300, Bandit wrote:
    [color=blue]
    > I am looking for any help with a form I am trying to make,[/color]


    [ snip irrelevance ]


    HTML groups are down the hall ---------------->



    Regards,

    Ian

    --
    Ian.H
    digiServ Network
    London, UK


    Comment

    • oeb -=- bleh bleh bleh

      #3
      Re: Drop down menu in a PHP submit form


      "Bandit" <webmaster@ba r-guide.ca> wrote in message
      news:By4Oc.3971 3$vO1.196126@nn rp1.uunet.ca...[color=blue]
      > Hi there,
      > I am looking for any help with a form I am trying to make, one of the
      > feilds I want it to be a drop down menu, so this part of the form has set
      > values and nothing else.
      >
      > I have tried a few times too make this work, but I can never make it work,[/color]
      I[color=blue]
      > can`t even seem to find help ojnline for this issue.
      >
      > If anyone here can geve me some code or point me in the way of a good
      > tutorial I would be thankful for the help
      >
      > Bandit.
      >
      >[/color]

      The Form

      <form method="post" action="form.ph p">
      <select name="selectite m">
      <option value="option 1">Option 1</option>
      <option value="option 2">Option 2</option>
      <option value="option 3">Option 3</option>
      </select>
      <input type="submit" value="send">
      </form>

      The PHP
      <?php
      print $_POST['selectitem'];
      ?>


      Comment

      • Bandit

        #4
        Re: Drop down menu in a PHP submit form

        Thanks - I have tried this and I get the return of field cannot be null...



        "oeb -=- bleh bleh bleh" <oeb@cotse.co m> wrote in message
        news:ceaooq$imv $1@kermit.esat. net...[color=blue]
        >
        > "Bandit" <webmaster@ba r-guide.ca> wrote in message
        > news:By4Oc.3971 3$vO1.196126@nn rp1.uunet.ca...[color=green]
        > > Hi there,
        > > I am looking for any help with a form I am trying to make, one of the
        > > feilds I want it to be a drop down menu, so this part of the form has[/color][/color]
        set[color=blue][color=green]
        > > values and nothing else.
        > >
        > > I have tried a few times too make this work, but I can never make it[/color][/color]
        work,[color=blue]
        > I[color=green]
        > > can`t even seem to find help ojnline for this issue.
        > >
        > > If anyone here can geve me some code or point me in the way of a good
        > > tutorial I would be thankful for the help
        > >
        > > Bandit.
        > >
        > >[/color]
        >
        > The Form
        >
        > <form method="post" action="form.ph p">
        > <select name="selectite m">
        > <option value="option 1">Option 1</option>
        > <option value="option 2">Option 2</option>
        > <option value="option 3">Option 3</option>
        > </select>
        > <input type="submit" value="send">
        > </form>
        >
        > The PHP
        > <?php
        > print $_POST['selectitem'];
        > ?>
        >
        >[/color]


        Comment

        • Larry Jaques

          #5
          Re: Drop down menu in a PHP submit form

          On Thu, 29 Jul 2004 09:11:30 -0300, "Bandit" <webmaster@ba r-guide.ca>
          calmly ranted:
          [color=blue]
          >Thanks - I have tried this and I get the return of field cannot be null...[/color]

          Give it a default option of your choice, such as

          <option value="option 1" selected>Option 1</option>
          ^^^^^^^^

          [color=blue]
          >"oeb -=- bleh bleh bleh" <oeb@cotse.co m> wrote in message
          >news:ceaooq$im v$1@kermit.esat .net...[/color]
          [color=blue][color=green]
          >> The Form
          >>
          >> <form method="post" action="form.ph p">
          >> <select name="selectite m">
          >> <option value="option 1">Option 1</option>
          >> <option value="option 2">Option 2</option>
          >> <option value="option 3">Option 3</option>
          >> </select>
          >> <input type="submit" value="send">
          >> </form>
          >>
          >> The PHP
          >> <?php
          >> print $_POST['selectitem'];
          >> ?>
          >>
          >>[/color]
          >[/color]


          -------------------------------------------------
          - Clinton never - * Wondrous Website Design
          - EXhaled.- * http://www.diversify.com
          -------------------------------------------------

          Comment

          • Geoff Berrow

            #6
            Re: Drop down menu in a PHP submit form

            I noticed that Message-ID: <ZP5Oc.39722$vO 1.196120@nnrp1. uunet.ca> from
            Bandit contained the following:
            [color=blue]
            >Thanks - I have tried this and I get the return of field cannot be null...[/color]

            The following works on my machine:

            <html>
            <head>
            <title>Untitl ed Document</title>
            <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
            </head>

            <body bgcolor="#FFFFF F" text="#000000">
            <form method="post" action="">
            <select name="selectite m">
            <option value="option 1">Option 1</option>
            <option value="option 2">Option 2</option>
            <option value="option 3">Option 3</option>
            </select>
            <input type="submit" value="send">
            </form>


            <?php
            if(isset($_POST['selectitem'])){
            print $_POST['selectitem'];
            }
            ?>
            </body>
            </html>

            --
            Geoff Berrow (put thecat out to email)
            It's only Usenet, no one dies.
            My opinions, not the committee's, mine.
            Simple RFDs http://www.ckdog.co.uk/rfdmaker/

            Comment

            Working...