Skip to content

Instantly share code, notes, and snippets.

View ogatopro's full-sized avatar

ogatopro ogatopro

View GitHub Profile
@JaniKibichi
JaniKibichi / dbconnect.php
Created November 29, 2016 09:40
How to connect a USSD to a MYSQL DB
<?php
//Declare the Connection Credentials
$servername = 'localhost'; //or IP address for DB hosted elsewhere
$username = 'root';
$password = "";
$database = "ussd";
$dbport = 3306;
// Create connection
$db = new mysqli($servername, $username, $password, $database, $dbport);
// Check connection, if there is an error end the USSD connection