Skip to content

Instantly share code, notes, and snippets.

@edmondscommerce
Created November 3, 2011 15:18
Show Gist options
  • Save edmondscommerce/1336752 to your computer and use it in GitHub Desktop.
Save edmondscommerce/1336752 to your computer and use it in GitHub Desktop.
<?php
//First Off - Start the Session
session_start();
//Now Test if the Session contains a Student ID
if(array_key_exists('student_id', $_SESSION)){
//If it does, query the demo.students table for the details of that student
// If you get results, echo the first name + last name
// If not, display an error
}else{
//If not
// Check if a form has been submitted.
// If it has, save teh details to the database and store the student id in the session
// If not, display a html form for submitting details
}
function preDump($var) {
echo '<pre>';
var_dump($var);
echo '</pre>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment