|
|
|
ช่วยหน่อยค่ะใครก็ได้ ทำการสมัครชิดแล้ว มันเก็บข้อมูลได้บ้างไม่ได้บ้าง |
|
|
|
|
|
|
|
postques.php
Code (PHP)
<?
include('config.php');
$sql = "insert into student (studentID,name, facID ) values ('$studentID', '$name', $Faculty)";
$query = mysql_db_query($db, $sql);
mysql_close();
print "<br><div align=center><B>กระทู้ของคุณ $name ถูกตั้งเรียบร้อยแล้ว</B></div><BR>";
print "<div align=center><A HREF=\"displaystudent.php\">กลับไปหน้ากระทู้หลัก</A></div>";
?>
displaystudent.php
Code (PHP)
<?
print "<table width=437 border=0 align=center cellpadding=0 cellspacing=0 bordercolor=666666>";
print "<tr>";
print "<td width=500>";
print "<table width=500 align=center>";
include"config.php";
//$query ="select * from username order by id";student
$query ="select studentID, name,facname from student natural join faculty ";
$result = mysql_query($query);
$num = mysql_num_rows($result);
echo"<table border='1' bgcolor=999999>
<tr>
<th><font color=FFFFFF>รหัส</th>
<th><font color=FFFFFF>ชื่อ</th
><th><font color=FFFFFF>คณะ</th>
<th><font color=FFFFFF>option</th>
</tr>";
$i = 0;
while($i < $num)
{
$id = mysql_result($result,$i,"studentID");
$name = mysql_result($result,$i,"name");
$facname = mysql_result($result,$i,"facname");
echo"<tr>
<td><font color=000000><small>$id</small></td>
<td><font color=000000><small>$name</small></td>
<td><font color=000000><small>$facname</small></td>
<td><font color=000000><small><a href='deletesql.php?id=$id&&name=$name'>delete</small></a></td>
</tr>";
$i++;
}
echo"</table>";
mysql_close();
print "</td> ";
print "</tr>";
print"</table>";
?>
<div align="center">[<a href="LAB9-2.php">กลับหน้าจอ สมัครสมาชิก</a>]</div>
|
|
|
|
|
Date :
2010-09-06 21:58:14 |
By :
ninjaKMU |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 03
|