|
 |
|
เขียน code php แล้วขึ้น Resource id #3 ค่ะ..เขียน code ตามนี้ค่ะ แต่พอ run แล้วขึ้น Resource id #3 ค่ะ |
|
 |
|
|
 |
 |
|
เขียน code ตามนี้ค่ะ แต่พอ run แล้วขึ้น Resource id #3 ค่ะ
<?php
include 'include.inc';
GetPost();
$name=(isset($_POST['name']))?$_POST['name']:"";
$lastname=(isset($_POST['lastname']))?$_POST['lastname']:"";
if ( $name=="" || $lastname=="" || $occupation=="" || $food=="")
{
echo "<table width=550 align=center>";
echo "<tr> <td align=center bgcolor=#EAECEA><br><b>¡ÃسҡÃÍ¡¢éÍÁÙÅãËé¤Ãº</b><br>";
echo "<a href=javascript:history.back(); >¡ÅѺä»á¡éä¢</a><br><br>";
echo "</td></tr>";
echo "</table>";
}
else
{
$sql="select * from registerbf53 where pro_license = '$pro_license'";
$res = mysql_query ($sql, $link) or die($sql."<br>".mysql_error());
$n=mysql_num_rows($res) ;
if ($n ==0)
{
$sql="insert into registerbf53 (ch_tv1,ch_pv1,ch_pv3,ch_tv2,ch_pv2,ch_pv4,prename,prenamex,name,lastname,occupation,occupationx,hospital,workplace,pro_license,tel,fax,food,email) ".
"values ('$ch_tv1','$ch_pv1','$ch_pv3','$ch_tv2','$ch_pv2','$ch_pv4','$prename','$prenamex','$name','$lastname','$occupation','$occupationx','$hospital','$workplace','$pro_license','$tel','$fax','$food','$email')";
$res = mysql_query ($sql,$link);
if ($res ==1)
print ("¡ÒÃÊÁѤÃàÃÕºÃéÍÂáÅéÇ. ");
else
print ("¡ÃسҵÃǨÊͺÍÕ¡¤ÃÑé§ ¡ÒÃÊÁѤÃÂѧäÁèÊÁºÙóì.");
}
else
{
$row=mysql_fetch_array($res,MYSQL_BOTH);
print ("<center>ÁÕª×èÍ«éӨӹǹ pro_license <b>".$row["prolicense"]." </b> ÃÒª×èͤèÐ</center>");
}
}
?>
Tag : - - - -

|
|
 |
 |
 |
 |
Date :
2010-01-21 10:40:52 |
By :
onenueng |
View :
2827 |
Reply :
1 |
|
 |
 |
 |
 |
|
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
$res = mysql_query ($sql,$link);
if ($res ==1)
เปลี่ยนตรงนี้เป็นตัวแปรอื่นครับ
$res1 = mysql_query ($sql,$link);
if ($res1 ==1)
|
 |
 |
 |
 |
Date :
2010-01-21 12:01:01 |
By :
xbeginner01 |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 02
|