Php Float Value

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SSG001
    New Member
    • Oct 2007
    • 110

    #1

    Php Float Value

    How to check if the value entered in the qty fieldwhich is float value input box is greater then zero.

    Thanks in advance
  • Markus
    Recognized Expert Expert
    • Jun 2007
    • 6092

    #2
    whats a qty field?
    [php]
    if($something > 0)
    {
    // code
    }
    else
    {
    // code
    }
    [/php]

    Comment

    • SSG001
      New Member
      • Oct 2007
      • 110

      #3
      [php]
      $something =$_POSt[''qty"];
      //where user has put qty=0.01

      if($something > 0)
      {
      // code
      }
      else
      {
      // code
      }
      [/php]
      will this work in if condition
      [/QUOTE]

      Comment

      • Markus
        Recognized Expert Expert
        • Jun 2007
        • 6092

        #4
        Originally posted by SSG001
        [php]
        $something =$_POSt[''qty"];
        //where user has put qty=0.01

        if($something > 0)
        {
        // code
        }
        else
        {
        // code
        }
        [/php]
        will this work in if condition
        Urm.. yes.
        I'm confused as to your problem.

        Comment

        Working...