This is my error message.
Fatal error: Call to undefined function: mysql_connect() in /var/ on line 6
I just had someone install MYSQL on a Linux server for me so that my admin section to a site would work. I've used this same script in the past on Windows boxes are it's worked fine. This is the first time I've used it on a linux box, and the admin of the box said he's not sure if mysql needs configuring or anything. Below is my PHP script.
<? require ("includes/top_boe.php" ?>
<?
//connect to database and open it
$db = mysql_connect("localhost", "root"
mysql_select_db("cadb",$db);
$tableName = "jobs";
$pageName = "boe_jobs.php";
$result = mysql_query("SELECT * FROM $tableName ORDER BY sequence",$db);
echo "<table border=0 cellpadding=2 cellspacing=2><tr><td><b>Location</b></td><td><b>Title</b></td></tr><tr><td colspan=2><b>Description</b></td></tr>";
$i=0;
while ($myrow =mysql_fetch_array($result)) {
printf("<tr><td>%s</td><td><b>%s</b></td></tr><tr><td colspan=2>%s</td></tr>", $myrow["category"], $myrow["title"], $myrow["description"]);
$i++;
}
echo "</table>";
?>
<br><br><br><br>
<? require ("includes/bottom_boe.php" ?>
I ran the phpinfo() command and this is what it gave me.
So does anyone know why it isn't working??? I appreciate any help.
Jewel When faced with a decision, always ask, 'Which would be the most fun?'
Fatal error: Call to undefined function: mysql_connect() in /var/ on line 6
I just had someone install MYSQL on a Linux server for me so that my admin section to a site would work. I've used this same script in the past on Windows boxes are it's worked fine. This is the first time I've used it on a linux box, and the admin of the box said he's not sure if mysql needs configuring or anything. Below is my PHP script.
<? require ("includes/top_boe.php" ?>
<?
//connect to database and open it
$db = mysql_connect("localhost", "root"
mysql_select_db("cadb",$db);
$tableName = "jobs";
$pageName = "boe_jobs.php";
$result = mysql_query("SELECT * FROM $tableName ORDER BY sequence",$db);
echo "<table border=0 cellpadding=2 cellspacing=2><tr><td><b>Location</b></td><td><b>Title</b></td></tr><tr><td colspan=2><b>Description</b></td></tr>";
$i=0;
while ($myrow =mysql_fetch_array($result)) {
printf("<tr><td>%s</td><td><b>%s</b></td></tr><tr><td colspan=2>%s</td></tr>", $myrow["category"], $myrow["title"], $myrow["description"]);
$i++;
}
echo "</table>";
?>
<br><br><br><br>
<? require ("includes/bottom_boe.php" ?>
I ran the phpinfo() command and this is what it gave me.
So does anyone know why it isn't working??? I appreciate any help.
Jewel When faced with a decision, always ask, 'Which would be the most fun?'