|
|
|
ระบบเกสบุค เออเร่อช่วยดูให้ทีครับ คือเออเร่อในการรีเซ้า |
|
|
|
|
|
|
|
Code (PHP)
<meta http-equiv=Content-Type content="text/html; charset=utf-8">
<?php
$conn = mysql_connect("localhost","root","") or die("เข้าฐานไม่ได้");
$conndb = mysql_select_db("gbook") or die("ติดต่อฐานไม่ได้");
$strSQL = "SELECT * FROM tbl_guestbook";
$result = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
while(mysql_fetch_row($result))
{
$gName = mysql_result($result,"gName");
$gEmail = mysql_result( $result,"gEmail");
$gNote = mysql_result( $result,"gNote");
$gIP = mysql_result( $result,"gIP");
$gDateIn = mysql_result( $result,"gDateIn");
echo "<table border=\"0\" cellpadding=\"5\" cellspacing=\"0\">\n";
echo "<tr>\n";
echo " <td align=\"right\">ชื่อ :</td>\n";
echo " <td>$gName / [$gIP :: $gDateIn]</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo " <td align=\"right\">E-mail :</td>\n";
echo " <td>$gEmail</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo " <td align=\"right\" valign=\"top\">Note :</td>\n";
echo " <td>$gNote</td>\n";
echo "</tr>\n";
echo "</table>\n";
echo "<hr>\n";
}
mysql_close( $conn );
?>
<table border="0" cellpadding="5" cellspacing="0">
<form method=post action="phpSign.php">
<tr>
<td align="right">ชื่อ :</td>
<td><input type="text" name="gName" size="30"></td>
</tr>
<tr>
<td align="right">E-mail :</td>
<td><input type="text" name="gEmail" size="30"></td>
</tr>
<tr>
<td align="right" valign="top">Note :</td>
<td><textarea name="gNote" rows="5" cols="30"></textarea></td>
</tr>
<tr>
<td align="right"> </td>
<td><input type="submit" name="submit" value=" µ¡Å§ "></td>
</tr>
</form>
</table>
</body>
</html>
Warning: mysql_result() expects parameter 2 to be long, string given in /opt/lampp/htdocs/test/phpGuestBook.php on line 11
Warning: mysql_result() expects parameter 2 to be long, string given in /opt/lampp/htdocs/test/phpGuestBook.php on line 12
Warning: mysql_result() expects parameter 2 to be long, string given in /opt/lampp/htdocs/test/phpGuestBook.php on line 13
Warning: mysql_result() expects parameter 2 to be long, string given in /opt/lampp/htdocs/test/phpGuestBook.php on line 14
Warning: mysql_result() expects parameter 2 to be long, string given in /opt/lampp/htdocs/test/phpGuestBook.php on line 15
Tag : PHP, MySQL
|
|
|
|
|
|
Date :
2010-12-08 16:08:08 |
By :
zegend |
View :
1425 |
Reply :
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
เปลียนmysql_result ทุกอันที่คุณเขียนให้เป็นแบบนี้ครับ mysql_result($result)
แล้วก็สิ่งที่คุณต้องการน่าจะเป็นแบบนี้ Click....
|
|
|
|
|
Date :
2010-12-08 16:45:37 |
By :
kanchen |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 03
|