| Current Path : /var/www/html/venkat/electivejan2016/ |
| Current File : /var/www/html/venkat/electivejan2016/safecodes.txt |
------------preference -------------------
<table width="900" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<form name="form1" method="post" action="seditbasket.php">
<td>
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
<tr>
<td colspan="3"><strong>Choose your Preferences for All Baskets </strong></td>
</tr>
<tr>
<?php
$quer1=mysql_query("select basket from matrix where discipline='$truncated'group by basket") or die("Invalid Access !!!");
$b=0;
while ($row = mysql_fetch_array( $quer1 )) {
$n[$b]=$row['basket'];
$b++;
}
for ( $p = 0; $p <= $b-1; $p++)
{
$quer1=mysql_query("select subject from matrix where discipline='$truncated' and basket='$n[$p]'") or die("Invalid Access !!!");
$i=0;
echo("</tr><tr><td> <font color='red'> Choose Your Preference for Basket $n[$p] </font> </td></tr><tr>");
while ($row = mysql_fetch_array( $quer1 )) {
$m[$i]=$row['subject'];
$i++;
}
for ( $l = 1; $l <= $i; $l++)
{
echo("<td> Preference.$l </td>");
}
echo("</tr><tr>");
for ( $j = 0; $j <= $i-1; $j++)
{
echo("<td><select name='e'.$j id='subject' />");
echo("<option value='#'>-Select-</option>");
for ( $k = 0; $k <= $i-1; $k++)
{
echo("<option value=$m[$k]>$m[$k]</option>");
}
echo("</select></td>");
echo("<center>");
}
}
?>
</tr>
<tr>
<td><br><input type="submit" value="Submit"></td>
</tr>
</table>
</form>
</table>
------------preference -------------------