Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

can someone check this code!

Status
Not open for further replies.

martinb7

Programmer
Jan 5, 2003
235
GB
<?php
$conn = mysql_connect(&quot;$host&quot;,&quot;$user&quot;,&quot;$password&quot;)
or die(&quot;could not connect&quot;);

$rs = @mysql_select_db(&quot;$database&quot;, $conn)
or die(&quot;could not select database&quot;);

$sql=&quot;SELECT * FROM test&quot;;

$rs=mysql_query($sql,$conn)
or die(&quot;could not execute query&quot;);

$row_members=mysql_fetch_array($rs)
?>

<html>
<head>
<title>Test1.php</title>
<meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot;>
</head>

<body>
<?php echo $row_members['fname']; ?>
</body>
</html>

when i test it i want to no why it says &quot;could not execute query&quot;

can some1 fix it for me?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top