Where clause in PHP doesn't work with variable

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • useruser888
    Corporal

    • Jan 2010
    • 14

    #16
    Re: Where clause in PHP doesn't work with variable

    Hi:

    I want to have a pull down menu for US states. But don't know how to get a value. I found some thing from web:
    <form action="./" method="GET">
    <select name="state">
    <option value="AL">Alabama</option>
    <option value="AK">Alaska</option>
    <option value="AZ">Arizona</option>
    <option value="AR">Arkansas</option>
    </select>

    But the name return '' after selecting.

    Please help me.

    Comment

    • useruser888
      Corporal

      • Jan 2010
      • 14

      #17
      Re: Where clause in PHP doesn't work with variable

      Hi:

      I am confused with the date field. I have the following code for a birthdate entry:
      <td>Birth Date: <input type="text" name="birthdate" size="8" maxlength="8"> ex. 19910101</td
      ....
      mysql_query("INSERT INTO studentname (birthdate) values ('$_POST[birthdate]')";

      Now I got error says:

      Error: Incorrect date value: '20000212'

      Should I do some conversion? How do I do it?

      Thank you for your help.

      Comment

      • useruser888
        Corporal

        • Jan 2010
        • 14

        #18
        Re: Where clause in PHP doesn't work with variable

        Thank you all. I have fixed the problems.

        Comment

        • navaldesign
          General & Forum Moderator

          • Oct 2005
          • 12080

          #19
          Re: Where clause in PHP doesn't work with variable

          Why don't you use ABVFP to automatically create the table and store the form values ???

          Unless you are doing this for learning purposes.
          Navaldesign
          Logger Lite: Low Cost, Customizable, multifeatured Login script
          Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
          DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
          Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

          Comment

          • leelloo
            Private

            • Jan 2008
            • 1

            #20
            Re: Where clause in PHP doesn't work with variable

            i need to have youtube on my web and want to publish my video on my website .what do i do ? i have youtube account.i don't want to publish/uppload directly to youtube .

            thank you inadvance!

            Comment

            Working...
            X