Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Nov 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    PHP Drop down List problem. Please Help

    This is basically what i need. I need users to select a manufacturer to post on a classified ad.
    When the users make the selection I need that information processed and sent to the page I point
    it to permanently for other users to see. The same for any user that makes a post

    I know that their must be a simple way of doing this. I am not great with php but I have put forth a valiant effort to get this done. I am stumped please help.

    Here is my code.

    HTML:

    Code:
    <select action="select.php" name="manufacturer">
    <option value="Lincoln">Lincoln</option>
    <option value="Example">Example</option>
    </select>
    PHP:

    PHP Code:
    <?php
    if(isset($_POST['manufactuer']))
    echo 
    "Manufacturer: ".$_POST['manufacturer'];
    else {
    ?>
    I call to the selection with this.

    PHP Code:
    <?php echo "Manufacturer: ".$_POST['manufacturer']; ?>
    This code only displays for the current session.
    I need to do this permanently.

  • #2
    Senior Coder
    Join Date
    Apr 2010
    Posts
    1,410
    Thanks
    68
    Thanked 102 Times in 101 Posts
    You can store it in a database to save it, or use set it as a global variable.
    Been a sign maker for 7 years. My business:
    American Made Signs


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •