W3C Markup Validation Service

nicoinfodom77

New Member
Messages
19
Reaction score
0
Points
0
Hi,

I have 3 problems on my php page, concerning a contact's form, and I am not able to solve them for now.

" Line 83, Column 38: there is no attribute "name"
<form action='' method='post' name='Form'>

You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.

Line 86, Column 29: there is no attribute "width"
<tr><td align='right' width='30%'><span class='txtform'>Votre Nom* :</span></td…

You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.

Line 86, Column 161: there is no attribute "border"
…'text' style='width:200 ;' name='f_1' value='' size='24' border='0'/></td></tr>

You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash."

And here part of my php code which is concerned by these errors :

<form action='<? echo $PHP_SELF ?>' method='post' name='Form'>
<table width='100%' border='0' cellspacing='1' cellpadding='1'>
<? if($erreur){ ?><tr><td colspan='2' bgcolor='red'><span class='txterror'><font color='white'><b>&nbsp;ERREUR, votre message n'a pas été transmis</b></font></span></td></tr><tr><td colspan='2'><ul><?echo$erreur?></ul></td></tr><?}?>
<tr><td colspan='2'><span class='txterror'>Les champs marqués d'un * sont obligatoires</span></td></tr>
<tr><td align='right' width='30%'><span class='txtform'>Votre Nom* :</span></td><td><input type='text' style='width:200 <?if($errf_1==1){print("; background-color: ".$color_form_warn."; color: ".$color_font_warn);}?>;' name='f_1' value='<?echo stripslashes($f_1);?>' size='24' border='0'/></td></tr>

Thanks for your help !
 

stpvoice

Community Support Rep
Community Support
Messages
5,987
Reaction score
212
Points
63
This is not a free hosting support issue. Moved to Programming Help.
 

essellar

Community Advocate
Community Support
Messages
3,295
Reaction score
227
Points
63
What doctype are you using? The name attribute for forms is deprecated in favor of the id attribute. Fields (input controls, selects, buttons, etc.) can still have a name attribute (it's actually necessary for some functionality), but the form itself should no longer have a name if you're using an XHTML Strict doctype. The same goes for the other attributes the validator has been complaining about -- they're deprecated in XHTML Strict (and HTML 4.01 Strict) in favor of CSS. If you need those attributes to make the page work in all of your target browsers, you'll have to switch to a Transitional doctype declaration.
 

nicoinfodom77

New Member
Messages
19
Reaction score
0
Points
0
Thanks, I was using xHtml doctype. I have just switched to Transitionnal Doctype, and now only one error left :

Validation Output: 1 Error

Line 86, Column 163: there is no attribute "border"
…ext' style='width:200px ;' name='f_1' value='' size='24' border='0'/></td></tr>

You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.

On this line of code, according to W3C:

<tr><td align='right' width='30%'><span class='txtform'>Votre Nom* :</span></td><td><input type='text' style='width:200px ;' name='f_1' value='' size='24' border='0'/></td></tr>

Do you have any idea about it?
 

essellar

Community Advocate
Community Support
Messages
3,295
Reaction score
227
Points
63
Mais, certainment: just delete the border="0" part and add border-width:0 to the style attribute.
 
Top