I am a complete newbee and i am trying to connect to my sqldatabase.
Previously the connection to sql worked but when i try to connect to sql and my database & echo a confirm i get the following appear on my screen.
Resource id #31
What is this?
My code is below,
<?php
$connect_to_sql = mysql_connect("localhost", "username", "password")or die
("Could not connect");
if ($connect_to_sql)
{$sql_confirmed = "SQL Connected";
}
$connect_to_database = mysql_select_db("tablename") or die
("Could not connect to the database");
if ($connect_to_database)
{$database_confirmed = "Database Connected";
}
?>
<html>
<head>
<title>Untitled</title>
</head>
<body>
<?php
echo "$connect_to_sql";
echo "$connect_to_database";
mysql_close();
?>
</body>
</html>










Bookmarks