Hi,
I have mysql, apache and php on my redhat 7 box and when I try to retrieve some
data from the database and display it on a webage, it doesn't display anything.
I seem to be able to connect to it fine but not pull any data. Here is the main
part of the code I am using:
<html>
<head>
<title> #### This is a PHP test #### </title>
</head>
<body bgcolor="blue">
<?php
//db_connect.php
include "common_db.inc";
error_reporting(1);
$link_id = db_connect("phptest");
if (!$link_id) {
die (sql_error());
}
else echo "Successfully made a connection to $dbhost using $default_dbname . <br>";
if (!$result=mysql_query("select * from user",$link_id)) {
echo "No! I selected nada from the user table";
}
else echo "Yes I can connect! Amen!";
?>
</body>
</html>
Basically what happens is I get the message saying that I successfully
connected to the database and then underneath I get the "No! I selected
nada..." message. Could someone point me in the right direction?
Thanks,
Scott
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]