<?php
include('connect.php');
session_start();
$rec=mysql_query("select * from prog");
$t=0;
print"<form method=post action=rating_insert.php>";
print "<table width=450 border=0 cellspacing=0 cellpadding=3>";
while($rec_row=mysql_fetch_array($rec))
{
$t=$t+1;
//display the result in two column
print "<tr><td><input name=chck[] type=checkbox value=$rec_row[proid]/></td><td colspan=3>$rec_row[pronm]</td>";
if($rec_row=mysql_fetch_array($rec))
{
$i+1;
print"<td><input name=chck[] type=checkbox value=$rec_row[proid] /></td><td colspan=3>$rec_row[pronm]</td></tr>";
$t=$t+1;
}
}
print "<tr><td></td><td></td><td align=right><input name=submit type=submit value='Submit' /></td></tr>";
print "</table>";
print "</form>";
//stores the number of result
$_SESSION['no']=$t;
?>
Now what I want to do is, I want to insert the program ID of those programs which the user select through checkboxes to another table. I have tried it but it is not working so I won't post the code. Need Help..
Any help is highly appreciated...
Edited by WingedPanther, 09 October 2009 - 01:05 PM.
add code tags (the PHP sheet)


Sign In
Create Account

Back to top









