SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,761
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Empty Form Fields

    Is it correct that a blank Form Input Field and blank Form Text Area both return an Empty String (instead of a Null)?

    Is it also correct that a blank set of Radio Buttons will return a Null (instead of an Empty String)?


    Debbie

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,220
    Mentioned
    58 Post(s)
    Tagged
    3 Thread(s)
    what happened when you tested it?
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  3. #3
    Non-Member
    Join Date
    Jun 2012
    Posts
    88
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by DoubleDee View Post
    Is it correct that a blank Form Input Field and blank Form Text Area both return an Empty String (instead of a Null)?

    Is it also correct that a blank set of Radio Buttons will return a Null (instead of an Empty String)?
    I agree with asking r937's question because your questions are meaningless since the answer to both questions is "yes" or "no" depending on how and what they are being returned to.

    Post your code for the scenario you are referring to and any error messages it creates.

    In the absence of you being more specific try Reading This For More info on how radio buttons and input fields work with PHP

  4. #4
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,761
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by r937 View Post
    what happened when you tested it?
    Apparently what I am conjecturing...


    Debbie

  5. #5
    Non-Member
    Join Date
    Jun 2012
    Posts
    88
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by DoubleDee View Post
    Apparently what I am conjecturing...
    Then unless you are getting different results on multiple runs of a given piece of your test code then you are conjecturing nothing because the output of your test code will have answered your questions with a definite yes or no.

    For a given input, if you are getting different outputs (and you shouldn't be) on multiple runs of a given piece of your test code then post your test code.


Bookmarks

Posting Permissions

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