Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2005
    Posts
    18

    Unanswered: PHP Connection Error

    I just need help with my login connection php for registered users to my site.
    This is the error that it brings out when a user typed in his or her username and password....it shows

    " Fatal error: Call to undefined function mysql_connect() in H:\Apache2\htdocs\LOGIN\db_fns.php on line 5 "

    This is my db_fns.php file

    <?php

    function db_connect()
    {
    $result = mysql_connect("localhost", "username", "password") or warn("Cannot connect!");
    if (!$result)
    return false;
    if (!mysql_select_db('Property',$result))
    return false;

    return $result;
    }

    ?>

    Can anyone help?

    The error is from here:

    $result = mysql_connect("localhost", "username", "password") or

  2. #2
    Join Date
    Aug 2005
    Posts
    18

    PHP Connection error

    I am trying to connect to mysql database but it keep on giving this error below:


    Warning: mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client in H:\Apache2\htdocs\home\Connections\dbconn.php on line 9
    Client does not support authentication protocol requested by server; consider upgrading MySQL client

    I am using PHP4, MYSQL5, and Apache2 ...

    The dbconn.php is here below:

    <?php
    # FileName="Connection_php_mysql.htm"
    # Type="MYSQL"
    # HTTP="true"
    $hostname_dbconn = "localhost";
    $database_dbconn = "home";
    $username_dbconn = "root";
    $password_dbconn = "admin";
    $dbconn = mysql_connect($hostname_dbconn, $username_dbconn, $password_dbconn) or die(mysql_error());
    ?>

    Can anyone help pls...

Posting Permissions

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