<?php
$conn = mysql_connect("$host","$user","$password"
or die("could not connect"
;
$rs = @mysql_select_db("$database", $conn)
or die("could not select database"
;
$sql="SELECT * FROM test";
$rs=mysql_query($sql,$conn)
or die("could not execute query"
;
$row_members=mysql_fetch_array($rs)
?>
<html>
<head>
<title>Test1.php</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?php echo $row_members['fname']; ?>
</body>
</html>
when i test it i want to no why it says "could not execute query"
can some1 fix it for me?
$conn = mysql_connect("$host","$user","$password"
or die("could not connect"
$rs = @mysql_select_db("$database", $conn)
or die("could not select database"
$sql="SELECT * FROM test";
$rs=mysql_query($sql,$conn)
or die("could not execute query"
$row_members=mysql_fetch_array($rs)
?>
<html>
<head>
<title>Test1.php</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?php echo $row_members['fname']; ?>
</body>
</html>
when i test it i want to no why it says "could not execute query"
can some1 fix it for me?