Re: Cannot connect to Database
| From: | Supersky | Date: | Fri, 28 Jan 2005 01:28:41 +0000 |
| Subject: | Re: Cannot connect to Database | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-207542@lists.php.net to get a copy of this message | ||
Thank all of you who helped me. My problem has been solved.
Supersky
"Supersky" <ganxianghua@gmail.com> wrote in message
news:20050127155459.58965.qmail@lists.php.net...
> Hello,
>
> I'm using the following statements to connect to a database.
>
> <?php $conn = mysql_connect('localhost', 'root', '') or die
> ("Can't
> Connect To
> Database");
> $db = mysql_select_db("testDB", "$conn") or die ("Can't Select
> Database".
> mysql_error()); ?>
>
> But I cannot, and I see Fatal error: Call to undefined function
> mysql_connect() in ....
>
> My OS is WinXP, I have installed Mysql 4.1, Apache 2.0.52, and PHP 5.03.
> Apache and PHP work well if I don't connect to a database.
>
> Please any help or suggestions are welcome. Thanks!
>
> Gan