请问修改功能怎么加啊,实在是不会了,求帮忙。
这是我写的php代码,求修改功能,我实在是不会了。
Select Person
Select Person
$submit = $_POST['submit'];
$id = $_POST['id'];
$sex = $_POST['sex'];
$row[] = $_POST['row'];
$db = mysql_connect("localhost","root","root");
if (!$db)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("aa", $db);
$result1 = mysql_query("select *
from mstemployeebasic where EmployeeManagementID='".$id."' limit 0,30");
$result2 = mysql_query("select *
from mstemployeebasic where EmployeeSex='".$sex."'
");
mysql_close($db);
echo "
EmployeeManagementID |
EmployeeCode |
EmployeeName |
EmployeeName_English |
EmployeeSex |
Button |
";
while($row = mysql_fetch_array($result1))
{
echo "";
echo "" . $row['EmployeeManagementID'] . " | ";
echo "" . $row['EmployeeCode'] . " | ";
echo "" . $row['EmployeeName'] . " | ";
echo "" . $row['EmployeeName_English'] . " | ";
if($sex == 1){
echo "" . $row['EmployeeSex'] = 'Male'. " | ";
} else
echo "" . $row['EmployeeSex'] = 'Female'. " | ";
?>
echo "
";
}
while($row = mysql_fetch_array($result2))
{
echo "";
echo "" . $row['EmployeeManagementID'] . " | ";
echo "" . $row['EmployeeCode'] . " | ";
echo "" . $row['EmployeeName'] . " | ";