I have learn to make website using php and mysql from tutorial book
And I have some problem and I don't know how to do with it. :X
If anyone know about solution to fix it please help....
Here is my code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>LOFO.in.th : LOST & FOUND (beta) PROJECT @KMITL</title>
<LINK REL="StyleSheet" HREF="css/style.css" TYPE="text/css" MEDIA=screen>
<meta http-equiv=Content-Type content="text/html; charset=tis-620">
</head>
<body>
<?php
//header("Content-Type: text/plain; charset=TIS-620");
include('config.inc.php');
function renHTML($strTemp)
{
$strTemp=nl2br(htmlspecialchars($strTemp));
return $strTemp;
}
$sql="SELECT * FROM lost WHERE showid=$bi";
$result=mysql_db_query($DBName,$sql);
$dbarr=mysql_fetch_array($result);
?>
<div id="navbox"><ul>
<li class="logoa"></li>
<li class="lost"><br />LOST</li>
<li class="found"><br /><a href="#">FOUND</a></li>
</ul>
</div>
<div id="lostbox">
<div id="lost_desc">
<?php echo renHTML($dbarr['name']);?>
</div>
</body>
</html>
They say "Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in E:\AppServ\www\lofo\show_lost.php on line 19"
and when I put $dbarr=mysql_fetch_array($result) or die mysql_error(); instead...
They'll say "Parse error: syntax error, unexpected T_STRING in E:\AppServ\www\lofo\show_lost.php on line 19"
What happen to my code?
Anyone could help please?
I've been stuck with this error for a week...
So sad... :(
And sorry if my English is too bad...
Thank you very much,scodex.