BACK
// Connect to database as user
$con = mysqli_connect("localhost","dwbilqug_lark","PA99f5y+g8bx");
// Drop connection if connection failed and display error
if (!$con)
{
die('Could not connect: Invalid Credentials');
}
// Select database
mysqli_select_db($con, "dwbilqug_larkdb");
// Verify legitimate id before loading and drop connection if invalid
$project_id = $_GET['id'];
if( ! is_numeric($project_id) )
die('Invalid project id');
// Create and launch query to select HTML code for selected project
$query1 = "SELECT html FROM projects WHERE project_id='$project_id'";
$custom_html = mysqli_query($con, $query1);
while($row = mysqli_fetch_array($custom_html))
{
$html = $row['html'];
// Echo the HTML code for the project
echo "$html";
}
// Echo container for scrolling gallery
echo "
";
// Close connection to database
mysqli_close($con);
?>