Skip to content

Instantly share code, notes, and snippets.

@walterdavis
Created November 9, 2011 03:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save walterdavis/1350266 to your computer and use it in GitHub Desktop.
Save walterdavis/1350266 to your computer and use it in GitHub Desktop.
<?php
session_start();
define('MYACTIVERECORD_CONNECTION_STR', 'mysql://test:pass@localhost/test');
require_once('lib/MyActiveRecord.php');
class people extends MyActiveRecord{
};
if(isset($_SESSION['name'])){
if( $person = MyActiveRecord::FindFirst('people', 'name = "' . $_SESSION['name'] . '"')){
$person->layout = implode(',', $_POST['sort_me']);
$person->save();
}
}
header('x',true,200);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment