Skip to content

Instantly share code, notes, and snippets.

View hargi12's full-sized avatar

Haron Gichuhi hargi12

View GitHub Profile
@chales
chales / db-connect-test.php
Last active September 25, 2024 00:21
Script for a quick PHP MySQL DB connection test.
<?php
# Fill our vars and run on cli
# $ php -f db-connect-test.php
$dbname = 'name';
$dbuser = 'user';
$dbpass = 'pass';
$dbhost = 'host';
$connect = mysql_connect($dbhost, $dbuser, $dbpass) or die("Unable to Connect to '$dbhost'");