Skip to content

Instantly share code, notes, and snippets.

@edmondscommerce
Created November 2, 2011 11:29
Show Gist options
  • Save edmondscommerce/1333421 to your computer and use it in GitHub Desktop.
Save edmondscommerce/1333421 to your computer and use it in GitHub Desktop.
some notes from teaching zend 2
<?php
//setcookie('username', 'joseph');
//echo $_COOKIE['username'];
//Check if they have the cookie value for username
if(!empty($_COOKIE['username1'])){
//If they do display it
echo $_COOKIE['username1'];
}else{
// If they do not, display a form that will post the username
if(empty($_POST)){
}else{
}
// On form submission, save the username to the cookie and echo it
}
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