here is html form:
Code: Select all
<html>
<head>
<title>Welcome to my site</title>
<meta http-equiv="Content-Type" content="text-html;charset=iso-8859-1">
</head>
<body bgcolor="#C0C0C0">
<form action="review.php" method="post">
<table border="0" width="957" height="438">
<tr>
<td width="949" colspan="4" height="28">
<h2 align="center"><font color="#000080">Welcome to review movies</font></h2>
</td>
</tr>
<tr>
<td width="299" height="48">
</td>
<td width="644" height="48" colspan="3">
</td>
</tr>
<tr>
<td width="472" colspan="2">
<b><font color="#000080">
Please input your name:</font></b>
<p>
<input type="text" name="uname" size="20">
</p>
</td>
<td width="471" colspan="2">
<p align="center"><img border="0" src="4.jpg" width="100" height="123" align="left">
</td>
</tr>
<tr>
<td width="299">
<hr>
</td>
</tr>
<tr>
<td width="937" height="60" colspan="4">
<b><font color="#000080">Gender:</font></b>
<p>
<b><font color="#000080">
<input type="radio" name="sex" value="V21">male<input type="radio" name="sex" value="V22">female</font></b></p>
</td>
</tr>
<tr>
<td width="345" height="59" colspan="3">
<hr>
<b><font color="#000080">
Movie name: Terminator III</font></b>
</td>
<td width="604" height="59">
<img border="0" src="3.jpg" width="102" height="140"> <img border="0" src="2.jpg" width="100" height="140">
<img border="0" src="1.jpg" width="99" height="138">
</td>
</tr>
<tr>
<td width="299">
<hr>
<b><font color="#000080">You can review the movie as follow options:</font></b>
</td>
</tr>
<tr>
<td width="949" height="21" colspan="4">
<b><font color="#000080">Acting:</font></b>
<b><font color="#000080"><input type="radio" name="group1" value="A1" checked>1
<input type="radio" name="group1" value="A2">2
<input type="radio" name="group1" value="A3">3
<input type="radio" name="group1" value="A4">4
<input type="radio" name="group1" value="A5">5
</font></b>
</td>
</tr>
<tr>
<td width="949" height="21" colspan="4">
<font color="#000080"><b>Actor:</b></font>
<b><font color="#000080"><input type="radio" name="group2" value="Actor1" checked>1
<input type="radio" name="group2" value="Actor2">2
<input type="radio" name="group2" value="Actor3">3
<input type="radio" name="group2" value="Actor4">4
<input type="radio" name="group2" value="Actor5">5
</font></b>
</td>
</tr>
<tr>
<td width="949" height="21" colspan="4">
<font color="#000080"><b>Plot:</b></font>
<b><font color="#000080"><input type="radio" name="group3" value="p1" checked>1
<input type="radio" name="group3" value="p2">2
<input type="radio" name="group3" value="p3">3
<input type="radio" name="group3" value="p4">4
<input type="radio" name="group3" value="p5">5
</font></b>
</td>
</tr>
<tr>
<td width="949" height="21" colspan="4">
<font color="#000080"><b>Music:</b></font>
<b><font color="#000080"><input type="radio" name="group3" value="m1" checked>1
<input type="radio" name="group4" value="m2">2
<input type="radio" name="group4" value="m3">3
<input type="radio" name="group4" value="m4">4
<input type="radio" name="group4" value="m5">5
</font></b>
</td>
</tr>
<tr>
<td width="949" height="21" colspan="4">
<input type="button" value="send form" name="submit">
</td>
</tr>
</table>
<form/>
</body>
</html>Code: Select all
<?php
echo ("Welcome, " . $uname . "!<br>");
echo("You didn't choose your gender<br>");
echo ("Your gender is: " . $sex);
echo ("<br>Your review for the movie: <br>");
echo ("For acting: " . $group1);
echo ("<br>For actor: " . $group2);
echo ("<br>For plot: " . $group3);
echo ("<br>For music: " . $group4);
echo ("<br>You opinion for the movie is: " . ($group1 + $group2 + $group3
+ $group4)/5)
?>