Last active
May 28, 2021 11:54
-
-
Save lefred/b97fe90f31115607e0d28ddc8a72ca16 to your computer and use it in GitHub Desktop.
php example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<header> | |
<title>PHP on OCI with MySQL Database Service</title> | |
</header> | |
<body> | |
<center><h1>PHP on OCI with MySQL Database Service</h1></center> | |
<hr> | |
<?php | |
$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>"; | |
} | |
?> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment