Hi
 
Check your PHP.ini is all mysql .so files are enabled.
 
Thanks & regards,
Muthukumar Selvarasu,
Project Manager (Web Development),
Webmasters Ltd.
 
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf
Of Stephen
Sent: Saturday, April 05, 2008 8:14 AM
To: [email protected]
Subject: [php_mysql] I am having trouble connecting to MySQL Database can
anyone help
 
I have a script that will connect to a MyQSL database but I recieve a 
error. Can anyone help. PHP is working in Apache as I can display the 
staus information page using.

<?php
phpinfo();
?>

This is my script:

<?php
$con = mysql_connect("localhost:3336","root","pass");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}

mysql_select_db("aprsdb", $con);

$result = mysql_query("SELECT * FROM APRSTrack");

echo "<table border='1'>
<tr>
<th>CallsignSSID</th>
<th>ReportTime</th>
<th>Latitude</th>
<th>Longitude</th>
<th>Icon</th>
<th>Course</th>
<th>Speed</th>
<th>Altitude</th>

</tr>";while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['CallsignSSID'] . "</td>";
echo "<td>" . $row['ReportTime'] . "</td>";
echo "<td>" . $row['Latitude'] . "</td>";
echo "<td>" . $row['Longitude'] . "</td>";
echo "<td>" . $row['Icon'] . "</td>";
echo "<td>" . $row['Course'] . "</td>";
echo "<td>" . $row['Speed'] . "</td>"; 
echo "<td>" . $row['Altitude'] . "</td>"; 
echo "</tr>";
}
echo "</table>";mysql_close($con);
?>

I recieve the following error:

Fatal error: Call to undefined function mysql_connect() in C:\Program 
Files\Apache Software Foundation\Apache2.2\htdocs\aprstrack.php on 
line 2

Can anyone help.
Stephen
 


[Non-text portions of this message have been removed]

Reply via email to