Question
Mysqli_connect create error 500
Hey! I get HTTP error 500 everytime I try to use mysqli_connect in my php file.
This is my code and link to the file I am having trouble with:
http://138.68.86.134/getInfo.php
<?php
session_start();
if(!isset($_SESSION["access"])) {
echo "null";
} else if (isset($_SESSION["access"])) {
// Here I am trying to use mysqli_connect
$db = mysqli_connect("138.68.86.134", "root", "mypassword", "database")
echo "Confirmed";
} else {
echo "Something went wrong...";
}
?>
This is my Info.php file:
http://138.68.86.134/info.php
I’ve followed every step for Debain LAMP tutorial here on DigitalOcean still this doesn’t work. I am very frustrated and I would highly appreciate any answer! Much love <3
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×