ratgurrl Posted August 23, 2008 Share Posted August 23, 2008 I am getting one error when I try to validate my page. document type does not allow element "input" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag This is because on line 30, a hidden input field is being added after the form tag. I am not able to get a DIV or other tag around this no matter where I place it. What can I do to fix this. Line30 <form method="post" action=""><input type="hidden" name="PHPSESSID" value="9bdffa610943a72baa8b5555bdec4a1d" /> Jen Link to comment https://forums.phpfreaks.com/topic/121041-solved-w3-validation-failing-on-form-due-to-hidden-input/ Share on other sites More sharing options...
ratgurrl Posted August 23, 2008 Author Share Posted August 23, 2008 I fixed it. I added the following to my config.php file... ini_set('arg_separator.output', '&'); //already had this ini_set('url_rewriter.tags', 'a=href,area=href,frame=src,input=src'); //Added this to fix the form validation Then, manually added the php session input field into my form... <input type="hidden" name="PHPSESSID" value="'.session_id().'" /> Link to comment https://forums.phpfreaks.com/topic/121041-solved-w3-validation-failing-on-form-due-to-hidden-input/#findComment-623966 Share on other sites More sharing options...
cooldude832 Posted August 23, 2008 Share Posted August 23, 2008 why do u need that sesion ID in a form any way? Link to comment https://forums.phpfreaks.com/topic/121041-solved-w3-validation-failing-on-form-due-to-hidden-input/#findComment-623968 Share on other sites More sharing options...
ratgurrl Posted August 24, 2008 Author Share Posted August 24, 2008 I don't, but it is getting automatically added by the script because I am using sessions for access control. Found the solution mentioned above on bugs.php.net, and it solved the problem. Link to comment https://forums.phpfreaks.com/topic/121041-solved-w3-validation-failing-on-form-due-to-hidden-input/#findComment-624120 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.