Jump to content

Valid XHTML input forms


Technex

Recommended Posts

Hi guys, long time no see.

 

Getting back into PHP again.

 

I have a question, I'm just starting on the basics of a log in system and I can't get this form to validate as XHTML 1.1 STRICT.

 

Here it is, I want to be able to extract this data and use it in PHP, while staying valid. The code here is fine, it's just when I try to make any usable submit data out of it.

 

<label for="inputUSERNAME">Username:</label><br/>

<input class="input" type="text" title="Please enter your Username"

maxlength="20" size="30" name="inputUSERNAME" id="inputUSERNAME" value="" />

 

<br/>

<br/>

 

<label for="inputPASSWORD">Password:</label><br/>

<input class="input" type="password" title="Please enter your Password"

maxlength="20" size="30" name="inputPASSWORD" id="inputPASSWORD" value="" />

 

Thank you very much.

Link to comment
Share on other sites

this is a valid form  in strict use a p tag around the labels and inputs

 

					<form method="post" action="template/contact.php">

                     <p><label>Name: </label>

                     <input type="text" name="name" size="40" /><br /></p>
                     <p><label>Subject: </label>
                     <select name="subject" style="width:150px;">
                        <option value="Advertise">Advertise</option>
                        <option value="Support">Support</option>
                        <option value="Web_Design">Web Master</option>
                        <option value="Problem">Problem</option>

                     </select>
                     <br /></p>
                     <p>
                     <label>Email:</label>
                     <input type="text" name="email" size="40" /><br /></p><p>
                     <label>Comments:</label><textarea rows="5" name="message" cols="30"></textarea><br /></p>
	                          <p><input type="submit" name="submit" value="Send!"/></p>

                  </form>

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.