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.  
I'm using Apache2, PHP4 and MySQL Ver 12.22 Distrib 4.0.24, for pc-linux-gnu 
(i386)

Thanks

Jon

Movie Database



Fatal error:  Call to undefined function:  mysql_connect() in 
/var/www/test5.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 = mysql_connect("192.168.2.16","mysql-username","mysql-password");
    // Select the database
    $db = mysql_select_db("movie_library", $link);
    // Query the database for all fields from table 'movies'
    $result = mysql_query("SELECT * FROM movies", $link);

    // Loop through all the rows 
    while ($row = mysql_fetch_object($result))
    {
        // print the object for each row
        print_r($row);
    }
?>
</pre>
</BODY>
</HTML>


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

Reply via email to