Skip to content

Instantly share code, notes, and snippets.

@sohag1192
Forked from bikashthapa01/database.php
Created April 14, 2025 18:47
Show Gist options
  • Save sohag1192/dfee7d2d22dd44cfcfa4cd236c3c6e7a to your computer and use it in GitHub Desktop.
Save sohag1192/dfee7d2d22dd44cfcfa4cd236c3c6e7a to your computer and use it in GitHub Desktop.
Database Connection in Php
<?php
$server= "localhost:3325";
$username= "root";
$password = "";
$connection = new mysqli($server,$username,$password);
if($connection->connect_error){
echo "Database Not Connected.";
}else{
echo "Database Connected.";
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment