Hi,
I am new in php and mysql. Most tutorials that I found on the web use "mysql_connect" to connect to the mysql database. But in my case it just doesn't work.
Below is the code that I've got:
<html>
<body>
<?php
$dblink=mysql_connect("localhost","user","passwd");
?>
</body>
</html>
I would expect the output of this would be:
<html>
<body>
</body>
</html>
However, all I got is:
<html>
<body>
Nothing else. Running the file in the shell with "php test.php" gives me the expected output.
I am sure the installations of php and mysql are fine because phpMyAdmin works without a single problem. They are both included in the fedora core 2 distribution.
"php --version" gives me:
PHP 4.3.8 (cgi) (built: Jul 16 2004 09:23:33)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
"mysql --version" gives me:
mysql Ver 11.18 Distrib 3.23.58, for redhat-linux-gnu (i386)
Thanks for your help!!!
Tim