Hello Guys, I have a codes for Ratings Question Using Radio Button, then i want to do is , if the user missed of the one question to be rated, then its should say, "One Question not Rated!" Can You Check if my Codes is Correct? or is there other way.
Thanks, This is my code
<?php
if( isset($_POST['trate1']) AND isset($_POST['trate2']) AND isset($_POST['trate3']) AND isset($_POST['trate4']) AND isset($_POST['trate5']) ) {
$teamwork = $_POST['trate1'] + $_POST['trate2'] + $_POST['trate3'] + $_POST['trate4'] + $_POST['trate5'];
$t1 = $_POST['trate1'] * 100;
$t2 = $_POST['trate2'] * 100;
$t3 = $_POST['trate3'] * 100;
$t4 = $_POST['trate4'] * 100;
$t5 = $_POST['trate5'] * 100;
$d = $teamwork * 100;
echo "<tr>";
echo "<th rowspan='5'>TEAMWORK</th>";
echo "<td>Communicates with other personnel in an open (being approachable/amiable), candid, clear, complete, consistent, interactive manner - initiates response/discussion. Listens effectively, demonstrates genuine interest in others. </td>";
echo "<td class='overall1' >$t1 %</td>";
echo "<td class='overall' rowspan='5'>$d %</td>";
echo "<td class='percentall' rowspan='5'>20%</td>";
echo "</tr>";
echo "<tr>";
echo "<td>Proactively works with team members to improve team collaboration and functioning on a continuous basis </td>";
echo "<td class='overall1' >$t2 %</td>";
echo "</tr>";
echo "<tr>";
echo "<td>Communicates with other personnel effectively to establish and maintain smooth working relations.</td>";
echo "<td class='overall1' >$t3 %</td>";
echo "</tr>";
echo "<tr>";
echo "<td>Volunteers on committees or projects that are outside typical job responsibilities.</td>";
echo "<td class='overall1' >$t4 %</td>";
echo "</tr>";
echo "<tr>";
echo "<td>Provides guidance to others as they work through conflicts and disagreements so they can become better 'team players' </td>";
echo "<td class='overall1' >$t5 %</td>";
echo "</tr>";
}
else{
$error = "Not Rated!";
echo "<tr>";
echo "<th rowspan='5'>TEAMWORK</th>";
echo "<td>Communicates with other personnel in an open (being approachable/amiable), candid, clear, complete, consistent, interactive manner - initiates response/discussion. Listens effectively, demonstrates genuine interest in others. </td>";
echo "<td class='overall1' >$error</td>";
echo "<td class='overall' rowspan='5'>$error</td>";
echo "<td class='percentall' rowspan='5'>20%</td>";
echo "</tr>";
echo "<tr>";
echo "<td>Proactively works with team members to improve team collaboration and functioning on a continuous basis </td>";
echo "<td class='overall1' >$error</td>";
echo "</tr>";
echo "<tr>";
echo "<td>Communicates with other personnel effectively to establish and maintain smooth working relations.</td>";
echo "<td class='overall1' >$error</td>";
echo "</tr>";
echo "<tr>";
echo "<td>Volunteers on committees or projects that are outside typical job responsibilities.</td>";
echo "<td class='overall1' >$error</td>";
echo "</tr>";
echo "<tr>";
echo "<td>Provides guidance to others as they work through conflicts and disagreements so they can become better 'team players' </td>";
echo "<td class='overall1' >$error</td>";
echo "</tr>";
}
?>