SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Addict
    Join Date
    May 2007
    Posts
    242
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    About Form Query String

    Hello. I have form that contains an input field (Screen) whose name contains an upper-case letter.

    Code HTML4Strict:
    <html>
    <head></head>
     
    <body>
     
    	<form action="http://localhost/example.php" method="get" name="form" id="form">
    		<input value="medium" name="Screen" id="screen"/>
    		<button name="upload" type="submit">Upload</button>
    	</form>
     
    </body>
    </html>
    So when sent the query is composed as:

    http://localhost/example.php?Screen=medium&upload=

    Although it works without problem, I want to ask that an upper-case in query string is valid or not?

    Thanks.

  2. #2
    Guru in training bronze trophy SoulScratch's Avatar
    Join Date
    Apr 2006
    Location
    Maryland
    Posts
    1,838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Doesn't matter if it's upper case, but it's better to be consistent - either Capitalize or lowercase.
    Cross browser css bugs

    Dan Schulz you will be missed

  3. #3
    SitePoint Enthusiast
    Join Date
    Jan 2009
    Location
    Canada
    Posts
    56
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by SoulScratch View Post
    Doesn't matter if it's upper case, but it's better to be consistent - either Capitalize or lowercase.
    a lot of people get into the habit of leaving the first letter lower case, and if there are two words, capitalizing the first letter of the second word.

  4. #4
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by owerio View Post
    Although it works without problem, I want to ask that an upper-case in query string is valid or not?
    Yes, it's perfectly valid.
    Birnam wood is come to Dunsinane

  5. #5
    Guru in training bronze trophy SoulScratch's Avatar
    Join Date
    Apr 2006
    Location
    Maryland
    Posts
    1,838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by canassassin View Post
    a lot of people get into the habit of leaving the first letter lower case, and if there are two words, capitalizing the first letter of the second word.
    yes, that's called camelCase but it isn't typically used unless it's actual programming - though there are exceptions where front end devs use it, it's a rarity for form name values.
    Cross browser css bugs

    Dan Schulz you will be missed


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
  •