Menu

error

2016-12-20
2021-02-03
  • Lowell Jehu

    Lowell Jehu - 2016-12-20

    i am having an error while trying to log in ... and i have updated my databaseconnection.php but im not too sure about my host it says myhost is unknown ....

     
  • xanthos

    xanthos - 2016-12-20

    It seems that your config is wrong... can you post some bits of your code in order to have a better understanding?

     
  • Lowell Jehu

    Lowell Jehu - 2016-12-20

    function connectToDB(){
    $host="localhost:3306"; // Host name
    $username="root"; // Mysql username
    $password=""; // Mysql password
    $db_name="mass_mailer"; // Database name

    // Connect to server and select database.
    $con = mysqli_connect("$host", "$username", "$password")or die("cannot connect");
    mysql_select_db("$db_name")or die("cannot select DB");
    return $con;
    

    }
    ?>

     
  • Lowell Jehu

    Lowell Jehu - 2016-12-21

    hey it writes cannot connect to Db and my database name is the right one...... what to do?

     
  • xanthos

    xanthos - 2016-12-22
    1. Check that your db is up and running. Copy paste your db url to your browser to test or go to your phpmyadmin link.
    2. Check your db port to be sure that your db is listening on 3306
     
  • gfn hgd

    gfn hgd - 2021-02-03

    i am also working the same blog and want that feature but i wanna take some advices from you guys about it that is this feature helpful for me or not.

     

Log in to post a comment.

MongoDB Logo MongoDB