Hello.


You should install MySQL support in PHP. See:

  http://dev.mysql.com/doc/refman/5.0/en/php-problems.html







Jon Miller wrote:

> I'm a newbie to MySQL so please bear with me.  I'm creating a program from =

> a script I found and I'm wondering why I keep getting the same error =

> message.

> I can connect to the mysql server while I'm ssh to the server, I also can =

> run phpmyadmin from my windows desktop and see the databases and create =

> databases, tables and input the data. =20

> I'm using Apache2, PHP4 and MySQL Ver 12.22 Distrib 4.0.24, for pc-linux-gn=

> u (i386)

> 

> Thanks

> 

> Jon

> 

> Movie Database

> 

> 

> 

> Fatal error:  Call to undefined function:  mysql_connect() in /var/www/test=

> 5.php on line 8

> 

> /var/www/test5.php:

> 

> <HTML>

> <BODY>

> Movie Database<BR>

> <pre>

> <?php

>     // Connect to MySQL server

>     // User name is root and password is blank

>     $link =3D mysql_connect("192.168.2.16","mysql-username","mysql-password=

> ");

>     // Select the database

>     $db =3D mysql_select_db("movie_library", $link);

>     // Query the database for all fields from table 'movies'

>     $result =3D mysql_query("SELECT * FROM movies", $link);

> 

>     // Loop through all the rows=20

>     while ($row =3D mysql_fetch_object($result))

>     {

>         // print the object for each row

>         print_r($row);

>     }

> ?>

> </pre>

> </BODY>

> </HTML>

> 

> 



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Gleb Paharenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
       <___/   www.mysql.com




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to