Hi there..
After selecting any of the radio button...and click register
i was able to get the course name display on another php page.
i do a GET to check what are my hidden values
and the url always shows
http://localhost/xampp/1/conreg.php?radio=COM01&ClassSize=&HeadCount=&
Class size and HeadCount as no value at all....
<html>
<head>
<title>TimeTable</title>
</head>
<body>
<h1> Here is the timetable</h1>
<?php
@ $db = new mysqli('localhost', 'root', '', 'mylifestyle');
if (mysqli_connect_errno()) {
echo 'Error: Could not connect to database. Please try again later.';
exit;
}
$query = "SELECT course.CourseCode, course.CourseName , course.Instructor , course.ClassSize , courseschedule.HeadCount , courseschedule.Date ,courseschedule.Time , courseschedule.Location FROM course INNER JOIN courseschedule ON course.CourseID = courseschedule.CourseID";
$result = $db->query($query);
$num_results = $result->num_rows;
echo "<table border='1'>
<tr>
<th>CourseID</th>
<th>Course Name</th>
<th>Instructor</th>
<th>HeadCount</th>
<th>Class size</th>
<th>Date</th>
<th>Time</th>
<th>Location</th>
<th>Register</th>
</tr>"; ?>
<?php
while($row = $result->fetch_assoc()) {
?>
<tr>
<form name="form1" method="get" action="conreg.php">
<td><? echo $row['CourseCode']; ?></td>
<td><? echo $row['CourseName']; ?></td>
<td><? echo $row['Instructor']; ?></td>
<td><? echo $row['HeadCount']; ?></td>
<td><? echo $row['ClassSize']; ?> </td>
<td><? echo $row['Date']; ?></td>
<td><? echo $row['Time']; ?></td>
<td><? echo $row['Location']; ?></td>
<td align='center'><input name='radio' type='radio' value=<? echo $row['CourseCode'];?> onClick='document.Submit.formVar.value='.$row['CourseName'].'> </td>
</tr>
<?php
}
$db->close();
?>
<input type="hidden" name="ClassSize" value="<? echo $row['ClassSize']; ?>"/>
<input type="hidden" name="HeadCount" value="<? echo $row['HeadCount']; ?>"/>
<td><input type="submit" name="Submit" value="Register"></td>
</form>
</body>
</html>
please help.. thanks a million