Skip to content

Instantly share code, notes, and snippets.

Last active May 28, 2021
What would you like to do?
php example
<title>PHP on OCI with MySQL Database Service</title>
<center><h1>PHP on OCI with MySQL Database Service</h1></center>
$user = "";
$pwd = "";
$mds = "";
$session = new mysqli($mds, $user, $pwd);
if ($con->connect_errno) {
echo ("Connection could not be established to MySQL");
else {
$result = $session->query('select @@version_comment as name, @@version as version');
$row = $result->fetch_row();
echo "<h3>You are connected successfully to <i>" . $row[0] . " " . $row[1] . "</i></h3>";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment