Results 1 to 3 of 3

Thread: [RESOLVED] Extracting html select value post form....

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 2007
    Location
    Godzone, oops Oz
    Posts
    355

    Resolved [RESOLVED] Extracting html select value post form....

    <SELECT NAME="movierating">
    <OPTION VALUE="1">1 / 10
    <OPTION VALUE="2">2 / 10
    <OPTION VALUE="3">3 / 10
    <OPTION VALUE="4">4 / 10
    <OPTION VALUE="5">5 / 10
    <OPTION VALUE="6">6 / 10
    <OPTION VALUE="7">7 / 10
    <OPTION VALUE="8">8 / 10
    <OPTION VALUE="9">9 / 10
    <OPTION VALUE="10">10 / 10
    </SELECT>
    How do I use the $_POST thingy to get the selected value from "movierating" in a post php script, i.e a second document not the form document. Hope that makes sense.

    something like $rating = $_POST ???????

  2. #2
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: Extracting html select value post form....

    You use the name you have given it in the select element.
    Code:
    $_POST['movierating'];
    Also, if it is being instered into a database ensure it is converted to an integer first.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 2007
    Location
    Godzone, oops Oz
    Posts
    355

    Re: Extracting html select value post form....

    Quote Originally Posted by visualAd
    You use the name you have given it in the select element.
    Code:
    $_POST['movierating'];
    Also, if it is being instered into a database ensure it is converted to an integer first.
    Coolio that did it

Posting Permissions

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



Click Here to Expand Forum to Full Width