Skip to content

Instantly share code, notes, and snippets.

View abbasghulam's full-sized avatar

Ghulam Abbas abbasghulam

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'");