Results 1 to 3 of 3
  1. #1
    Join Date
    May 2004
    Posts
    3

    Unanswered: New guy having problems

    I'm a C.S. student and my teacher has recently assigned me a linux machine that had already had MySQL installed on it. I managed to set the root password, but that's about all I've changed.

    When I try to connect to the MySQL server in a web page I created I use the following command.

    $connect = mysql_connect("132.235.15.134:8080", "root", "Eval11s") or
    die ("Hey check connect");

    However I recieve this error on my browser...

    Fatal error: Call to undefined function: mysql_connect() in /var/www/html/createmovie.php on line 2

    by the way, I am using the "mysql_connect" function inside the php tags.

    Is there something I'm missing here?

    Thanks
    Tim

  2. #2
    Join Date
    May 2004
    Location
    UK
    Posts
    2
    im not amazin a mysql but this might help, the script you have it connecting to the database but then dosent know what to do with it so it thinks its undefined. try this after ... $connect = mysql_connect("132.235.15.134:8080", "root", "Eval11s") or
    die ("Hey check connect");


    $query = "SELECT * FROM contact order by id desc";
    $result = mysql_query($query);
    $numrows = mysql_num_rows($result);
    echo "$row[ name of field ]":

    that should display the field content or u can use the var for other things

  3. #3
    Join Date
    Apr 2004
    Location
    Europe->Sweden->Stockholm
    Posts
    71
    Fatal error: Call to undefined function: mysql_connect() in /var/www/html/createmovie.php on line 2
    What version of PHP are you running, and are you sure PHP is compiled with MySQL support? It is enabled by default in PHP 4 if I remember correctly, but in PHP 5. You may have to recompile PHP with the --with-mysql cofigure option.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •