HELLO!! CAN ANY ONE GIVE ME SOME HELP ABOUT THIS RADIO BOX? IT WORK IF I SELECT IT, HOWEVER ONCE I LEAVE IN BLANK, IT DISPLAY AN ERROR MESSAGE. (Notice: Undefined index: discrate in C:\wamp\www\SSWP\renting.php on line 35 )
HI IS THE HTML CODE:
<div class="formorder">
<form name="renting" method="post" action="renting.php">
<table width="525" height="354">
<tr>
<td colspan="3"><div align="center" class="font_style">TRS VIDEO RENTAL SYSTEM - RENTING FORM</div></td>
</tr>
<tr>
<td width="171"> </td>
<td colspan="2"> </td>
</tr>
<tr>
<td height="28" class="font_style"><div align="right">Name:</div></td>
<td colspan="2"><label>
<input type="text" name="name" size="40" maxlength="40">
</label></td>
</tr>
<tr>
<td class="font_style"><div align="right">Address:</div></td>
<td colspan="2"><label>
<textarea name="address" cols="40" rows="4"> </textarea>
</label></td>
</tr>
<tr>
<td class="font_style"><div align="right">Email:</div></td>
<td colspan="2"><label>
<input name="email" type="text" size="40" maxlength="40">
</label></td>
</tr>
<tr>
<td class="font_style"><div align="right">Movie Type:</div></td>
<td colspan="2"><label>
<select name="movietype">
<option selected ></option>
<option>Sci-Fi</option>
<option>Comedy</option>
<option>Romance</option>
<option>Suspence</option>
<option>Horror</option>
</select>
</label></td>
</tr>
<tr>
<td class="font_style"><div align="right">Date of Hire:</div></td>
<td colspan="2"><label>
<input name="dateofhire" type="text" size="40" maxlength="40">
</label></td>
</tr>
<tr>
<td class="font_style"><div align="right">Number of Days:</div></td>
<td colspan="2"><label>
<input name="numberofdays" type="text" size="40" maxlength="40">
</label></td>
</tr>
<tr>
<td class="font_style"><div align="right">Distcount Rate:</div></td>
<td colspan="2"><label>
<input type="radio" name="discrate" value="regular customer">
Regular Customer
<input type="radio" name="discrate" value="new customer">
New Customer</label></td>
</tr>
<tr>
<td> </td>
<td colspan="2"> </td>
</tr>
<tr>
<td> </td>
<td width="47"><label>
<input type="submit" name="btn" value="HIRE">
</label></td>
<td width="285"><label></label>
<input type="reset"" name="reset" value="Reset"></td>
</tr>
<tr>
<td> </td>
<td colspan="2"> </td>
</tr>
<tr>
<td> </td>
<td colspan="2"> </td>
</tr>
</table>
</form>
</div>
<div class="body"></div>
</body>
</html>
HERE IS THE PHP CODE:
<?php
print"<P><strong>TR Video Rental System - CONFIRMATION</P></strong>";
echo "<div class='formorder'>";
echo "<table border=\"1\" width=\"420\">";
echo "<tr><td>";
echo "<p><b>NAME: </b>".$_POST['name']."</p>";
echo "</td></tr>";
echo "<tr><td>";
echo "<p><b>Address: </b>".$_POST['address']."</p>";
echo "</td></tr>";
echo "<tr><td>";
echo "<p><b>EMAIL: </b>".$_POST['email']."</p>";
echo "</td></tr>";
echo "<tr><td>";
echo "<p><b>Movie Type: </b>".$_POST['movietype']."</p>";
echo "</td></tr>";
echo "<tr><td>";
echo "<p><b>Date of Hire: </b>".$_POST['dateofhire']."</p>";
echo "</td></tr>";
echo "<tr><td>";
echo "<p><b>Number of Days: </b>".$_POST['numberofdays']."</p>";
echo "</td></tr>";
echo "<tr><td>";
echo "<p><b>Discount Rate: </b>".$_POST['discrate']."</p>";
echo "</td></tr>";
?>
PLEASE HELP ME..... THANKS