RE: [PHP] I'm newbie in PHP
| From: | Edward Kay | Date: | Tue, 24 Oct 2006 10:43:38 +0000 |
| Subject: | RE: [PHP] I'm newbie in PHP | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-243567@lists.php.net to get a copy of this message | ||
I expect this is because you haven't installed the MySQL extension. Look at
the output from phpinfo() - there should be a section called MySQL. If it's
not there, you haven't got the MySQL extension installed.
Edward
> -----Original Message-----
> From: Hassan Arteaga Rodriguez [mailto:hassan.arteaga@gmail.com]
> Sent: 24 October 2006 11:39
> To: php-general@lists.php.net
> Subject: [PHP] I'm newbie in PHP
>
>
> Hi all:
>
> Sorry if this question become a very simple but i'm getting errors when i
> try to connect to MySQL Server.
> I setup the PHP correctly..As example I run <?php phpinfo(); ?>
> from one web
> site I have been created.
> Then testing MySQL server with this simple code
>
> <?php
> $link = mysql_connect('myserver', 'myuser', 'mypass');
> if (!$link) {
> die('Could not connect: ' . mysql_error());
> }
> echo 'Connected successfully';
> mysql_close($link);
> ?>
>
> i got this error
>
> *Fatal error*: Call to undefined function mysql_connect() in *
> D:\WEB\aplicaciones\TestPHP\testmysql.php* on line *2*
>
>
> Any Help please ?
>
> best regards
>
> --
> MSc.Hassan Arteaga Rodríguez
> Microsoft Certified System Engineer
> IT Specialist.
> ColdFusion & .NET Programmer
>
>