PDA

View Full Version : Ratings: end tag for "input" missing!


Cyclist
16th of November 2008 (Sun), 11:16
I would like to make my website xhtml valid but the comment/rating form produces hundreds of errors! Right now I am trying to modify the code to elimante the errors.

One of those errors is that the end tag for "input" is missing at all rating radio inputs. I suppose it has to do with following code which you find at basecode/SCRIPT_comments.php.



<?php

ob_start();
if ($show_this_rating == "1") {
?>
<table border="0" cellspacing="0" cellpadding="0"><tr><td>&nbsp;</td>
<?php
for ($n=1; $n<=10; $n++) {
print "<td class=\"ee_css_paragraph_small\">&nbsp;&nbsp;&nbsp;{$n}</td>";
}
print "</tr><tr><td>{$str_rating_1}</td>";
for ($n=1; $n<=10; $n++) {
$selected = "";
if (@$rating_1 == $n) $selected = "checked ";
print "<td><input type=\"radio\" name=\"rating_1\" value=\"{$n}\" {$selected} ></td>";
}
print "</tr><tr><td>{$str_rating_2}</td>";
for ($n=1; $n<=10; $n++) {
$selected = "";
if (@$rating_2 == $n) $selected = "checked ";
print "<td><input type=\"radio\" name=\"rating_2\" value=\"{$n}\" {$selected} ></td>";
}
print "</tr><tr><td>{$str_rating_3}</td>";
for ($n=1; $n<=10; $n++) {
$selected = "";
if (@$rating_3 == $n) $selected = "checked ";
print "<td><input type=\"radio\" name=\"rating_3\" value=\"{$n}\" {$selected} ></td>";
}
print "</tr><tr><td>{$str_rating_4}</td>";
for ($n=1; $n<=10; $n++) {
$selected = "";
if (@$rating_4 == $n) $selected = "checked ";
print "<td><input type=\"radio\" name=\"rating_4\" value=\"{$n}\" {$selected} ></td>";
}
?>
</tr></table>
<?php
}
$comments_input_forminput_ratings = ob_get_contents();
ob_end_clean();
?>