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
https://forums.phpfreaks.com/topic/132474-valid-xhtml-input-forms/
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>

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.