|
 |
|
อยากให้คนที่สมัครสมาชิกเสร็จ สามารถดูข้อมูลที่กรอกเสร็จหลัง summit ได้ |
|
 |
|
|
 |
 |
|
อยากให้แสดงอยู่ในฟอร์มที่สมัครเลยครับ
Code (PHP)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874" />
<title>Untitled Document</title>
<style type="text/css">
<!--
body,td,th {
font-family: ms Sans Serif;
font-size: 15px;
color: #000000;
}
a:link {
color: #333333;
}
a:hover {
color: #993366;
}
.style1 {
font-size: 24px;
font-weight: bold;
color: #0033FF;
}
-->
</style></head>
<body>
<form id="form1" name="form1" method="post" action="add_data.php" >
<table width="708" border="1" align="center" cellpadding="1" cellspacing="1" bordercolor="#0033FF">
<tr>
<th scope="col"><p> </p>
<table width="500" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<th scope="col"><span class="style1">ประวัตินักศึกษา</span></th>
</tr>
<tr>
<th scope="col"> </th>
</tr>
<tr>
<th scope="col"><div align="left">รหัสประจำตัว
<input name="id" type="text" id="id" />
ชื่อสกุล
<input name="name" type="text" id="name" />
</div></th>
</tr>
<tr>
<th scope="col"> </th>
</tr>
<tr>
<th scope="col"><div align="left">สาขาวิชา
<input name="major" type="text" id="major" />
ชั้นปีที่
<input name="class" type="text" id="class" />
</div></th>
</tr>
<tr>
<th scope="col"> </th>
</tr>
<tr>
<th scope="col"><div align="left">เกรดเฉลี่ย
<input name="gpa" type="text" id="gpa" />
เกรดเฉลี่ยสะสม
<input name="gpax" type="text" id="gpax" />
</div></th>
</tr>
<tr>
<th scope="col"> </th>
</tr>
<tr>
<th scope="col"><div align="left">ชื่ออาจารย์ที่ปรึกษา
<input name="ad" type="text" id="ad" size="50" />
</div></th>
</tr>
<tr>
<th scope="col"> </th>
</tr>
<tr>
<th scope="col"><div align="left">หมายเลขโทรศัพท์
<input name="tel" type="text" id="tel" />
e mail
<input name="email" type="text" id="email" />
</div></th>
</tr>
<tr>
<th scope="col"> </th>
</tr>
<tr>
<th scope="col"><div align="left">ที่อยู่ที่สามารถติดต่อได้ </div></th>
</tr>
<tr>
<th scope="col"> </th>
</tr>
<tr>
<th scope="col"><textarea name="adress" cols="80" rows="7" id="adress"></textarea></th>
</tr>
</table>
<p>
<input type="submit" name="Submit" value="Submit" />
<label for="Submit"></label>
<input type="reset" name="Submit2" value="Reset" id="Submit" />
</p>
<p> </p>
</th>
</tr>
</table>
<p> </p>
</form>
</body>
</html>
ส่วนอันนี้คือ database
Code (PHP)
<?
include('config.inc.php');
$date_q=date("d/m/y");
$sql = "insert into member (id, name, major, class, gpa, gpax, ad, tel, email, adress) values ('".$_POST["id"]."','".$_POST["name"]."','".$_POST["major"]."','".$_POST["calss"]."','".$_POST["gpa"]."','".$_POST["gpax"]."','".$_POST["ad"]."','".$_POST["tel"]."','".$_POST["email"]."','".$_POST["adress"]."')";
$dbquery = mysql_db_query($dbname, $sql);
mysql_close();
print "<br><div align=center><B>ได้รับข้อมูลของ $name เรียบร้อยแล้ว</B></div><BR>";
print "<div align=center><A HREF=\"shows.php\">ดูข้อมูลของคุณ</A></div>";
?>
Tag : PHP

|
|
 |
 |
 |
 |
Date :
2011-02-07 17:40:46 |
By :
veerapong |
View :
854 |
Reply :
3 |
|
 |
 |
 |
 |
|
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ของผมใช้การ ล็อคอิน ด้วย session เดี๋ยวไปค้นมาให้ก่อนนะครับ
|
 |
 |
 |
 |
Date :
2011-02-07 21:20:35 |
By :
เด็กอ่อนหัด |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
รอดูอยู่ครับผม ขอบคุณมากครับ + ให้ทุกคนนะครับ
|
 |
 |
 |
 |
Date :
2011-02-07 22:46:18 |
By :
veerapong |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 05
|