hi everyone,who can help me solve the problem?i would like to print the checkbox result after ticked the selected checkbox,means how to retrieve the data from database of selected user?thanks.
<?php
include 'C:/wamp/www/micropos/condb1.php';
$con = mysql_connect("localhost","root","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("customer", $con);
print "<table width=800 border=1>\n";
for($i=1;$i<12;$i++){
if(isset($_POST['cd'.$i]))
{
$val = $_POST['cd'.$i];
print "<input type=\"text\" name=\"username\" value=\"$val\">";
}
}
$result = mysql_query($query)
or die("SELECT Error: ".mysql_error());
$num_rows = mysql_num_rows($result);
print "There are $num_rows records.<P>";
print "<table width=800 border=1>\n";
while ($get_info = mysql_fetch_row($result)){
print "<tr>\n";
foreach ($get_info as $field)
print "\t<td><font face=arial size=3/>$field</font></td>\n";
print "<input type=\"hidden\" name=\"username\" value=\"$val\">";
print "<input type=\"hidden\" name=\"username\" value=\"$get_info\">";
print "</tr>\n";
}
print "</table>\n";
?>