can anyone help to check my coding? what i need is to enter the groupcode and when i click search,it will retrieve all the modules. but only one module that appear instead of all.
<?php
$server="localhost";
$username="root";
$password="";
$connect_mysql=mysql_connect($server,$username,$password) or die ("Connection Failed!");
$mysql_db=mysql_select_db("reportdatabase",$connect_mysql) or die ("Could not Connect to Database");
$db_sch = "SELECT * FROM cweb01group WHERE `GroupCode` ='$GroupCode'";
//echo $db_sch;
$i = 0;
$res = mysql_query($db_sch) or die(mysql_error());
//echo mysql_num_rows($res);
while($row = mysql_fetch_assoc($res))
{
echo " <tr>
<td><a href='testingagain.php?module=".$row['ModuleCode']."</td>
<td>".$row['ModuleTitle']."</td></br>
</tr>";
}
mysql_close($connect_mysql);
?>
thanks :)