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
<?php | |
// Attempt to connect to your database. | |
$c = @oci_connect("orcl", "orcl", "localhost/orcl"); | |
if (!$c) { | |
print "Sorry! The connection to the database failed. Please try again later."; | |
die(); | |
} | |
else { | |
print "Congrats! You've connected to an Oracle database!"; | |
oci_close($c); |
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
<?php | |
// Attempt to connect to your database. | |
$c = @oci_connect("video", "video", "localhost/videodb"); | |
if (!$c) { | |
print "Sorry! The connection to the database failed. Please try again later."; | |
die(); | |
} | |
else { | |
print "Congrats! You've connected to an Oracle database!"; | |
oci_close($c); |
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
$(document).ready(function(){ | |
$('.gistinclude').each(function(){ | |
var gistLocation = $(this); | |
var state = 0; | |
$.getJSON('http://gist.github.com/'+$(this).attr('data-gistid')+'.json?callback=?' | |
, function(data){ | |
gistLocation.replaceWith(data.div); | |
if (state == 0) { | |
$('head').append('<link rel="stylesheet" href="https://gist.github.com'+data.stylesheet+'" type="text/css" />'); | |
state = 1; |
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
<?php | |
// Program name: credentials.inc | |
// MySQL Connection variables. | |
define('HOSTNAME',"localhost"); | |
define('USERNAME',"student"); | |
define('PASSWORD',"student"); | |
define('DATABASE',"studentdb"); | |
?> |
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
<?php | |
/* | |
|| Program Name: library.inc | |
*/ | |
function get_common_lookup($table_name, $column_name, $lookup_key = 0) { | |
// Include the credentials file if omitted. | |
include_once("MySQLCredentials.inc"); |