Code: Select all
andCode: Select all
tags where appropriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]
Hi friends,
I am brand new to PHP and I am really just learning it having installed the compiler for it along with a command-line version of MySQL on my windows XP personal laptop.
I have been trying to connect to this MySQL database but to no avail. I am using the following line of code to connect:Code: Select all
$dbcnx = mysql_connect('localhost', 'root', '111111');
echo "Database connection is the following: $dbcnx";
if ($dbcnx)
{
echo ("<P>Unable to connect to MySQL database server at this time. Please modify code.<P>");
}This results in the following error message:
Code: Select all
Fatal error: Call to undefined function mysql_connect() in c:\Inetpub\wwwroot\ProcessForm.php on line 50Code: Select all
c:\Program Files\MySQL\MySQL Server 4.1\bin\mysql.exe
connection id: 6
current user: root@localhost
connection: localhost via TCP/IP
TCP Port: 3306Do I have to install any additional componenents to my PHP install (version 5)? Or modify the php.ini file? I would assume this should be quite simple but I haven't figured out anyway to officially connect.
Any help would be greatly appreciated.
Thanks in advance
Zaid
feyd | Please use
Code: Select all
andCode: Select all
tags where appropriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]