Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
I was trying to make a trial in Dreamweaver MX 2004 to access the database in MySQL 5.0 under Windows XP.
I used the code from http://www.php.net like:Code: Select all
<?php
$link = mysql_connect('localhost', 'root', '12345678');
if (!$link)
{
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_close($link);
?>But gives me a error says:"Fatal error: Call to undefined function mysql_connect() in D:\Apache Group\Apache2\htdocs\Learn\Welcome.php on line 10", which is saying the line with "$link = mysql_connect('localhost', 'root', '12345678');" something is wrong.
Because in my previous post, I got problem with setting up MySQL connection in Dreamweaver MX 2004, so I just want to have a try to see if PHP can connect to MySQL directly. It seems it doesn't work. Anyone has any idea about this?
Thank you.
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]