|
|
|
แสดงข้อมูลในหน้าเดิม แต่รันแล้ว error ค่ะ occupation.php การทำงานของหน้าจอนี้นะคะ |
|
|
|
|
|
|
|
เข้าใจคำถามนะครับ แต่ว่าขอ code มาด้วยจะง่ายกว่าครับอธิบายแบบนี้มันจะยาว และไม่ตรงด้วยครับ
|
|
|
|
|
Date :
2010-06-17 14:56:51 |
By :
AnimalMan |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
code occupation.php ค่ะ
Code (PHP)
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
</head>
<body>
<table width="37%" border="0" cellspacing="0">
<tr bgcolor="#AFAFAF">
<td><?php include ("function1.php");?></td>
</tr>
<tr>
<td><table width="100%" border="0" cellspacing="0">
</table></td>
</tr>
<tr bgcolor="#F0F0F0">
<td><br>
<table width="100%" border="0" cellspacing="0">
<?php
$con = mysql_connect("localhost","root","");
mysql_select_db("mycrm",$con);
mysql_query("set character set UTF8");
mysql_query("set collation_connection=utf8_general_ci");
$id = $_GET['id'];
$occupation = "select * from occup where Occupation_Code = $id";
$result = mysql_query($occupation,$con);
while($rs = mysql_fetch_array($result)){
?>
<tr>
<td width="25%" bgcolor="#F0F0F0"><div align="right">รหัสอาชีพ</div></td>
<td width="77%" bgcolor="#F0F0F0"><input name="ocpation_code"
type="ocpation_code" id="ocpation_code" size="15" value="<?php echo $rs['Occupation_Code']?>"/></td>
</tr>
<tr>
<td bgcolor="#F0F0F0"><div align="right">รายละเอียด</div></td>
<td bgcolor="#F0F0F0"><input name="ocpation_name" type="text"
id="ocpation_name" size="40" value="<?php echo $rs['Occupation_Name']?>"/></td>
</tr>
<?php
}
?>
</table>
<br></td>
</tr>
<tr bgcolor="#F0F0F0">
<td><table width="100%" border="0" cellspacing="0">
<tr>
<td><table width="100%" border="1" cellspacing="0" bordercolor="#F5F5F5">
<tr>
<td width="25%" bgcolor="#DDDDDD"><div align="left">รหัสอาชีพ</div></td>
<td width="77%" bgcolor="#DDDDDD"><div align="left">รายละเอียด</div></td>
</tr>
<?php
$con = mysql_connect("localhost","root","");
mysql_select_db("mycrm",$con);
mysql_query("set character set UTF8");
mysql_query("set collation_connection=utf8_general_ci");
$occup = "select * from occup";
$result = mysql_query($occup,$con);
while($rs = mysql_fetch_array($result)){
?>
<tr>
<td bgcolor="#FFFFFF"><?php echo $rs['Occupation_Code']?></td>
<td bgcolor="#FFFFFF"><a href="occupationfile.php?id=<?php echo $rs['Occupation_Code']?>">
<?php echo $rs['Occupation_Name']?></a></td>
</tr>
<?php
}
?>
</table><br><br></td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
|
|
|
|
|
Date :
2010-06-17 15:31:57 |
By :
cantapat |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 02
|