require_once '../conf/general'; require_once '../../phplib/db.php'; require_once '../phplib/adm.php'; require_once '../phplib/admmodels.php'; $id = get_http_var("id", null); $journo_id = get_http_var("journo_id", null); if (is_null($journo_id)) { $journo_id = db_getOne("SELECT journo_id FROM journo_education WHERE id=?", $id); } $journo = db_getRow("SELECT * FROM journo WHERE id=?", $journo_id); admPageHeader($journo['ref'] . " Education Info"); $action = get_http_var('_action'); if ($action == 'update' || $action == 'create') { // form has been submitted $obj = new Education(); $obj->fromHTTPVars($_POST); /* print"<hr/><pre><code>\n"; print_r( $_POST ); print "--------\n"; print_r( $obj ); print"</code></pre><hr/>\n"; */ $obj->save(); ?> <div class="info">Saved.</div> <?php } else { $obj = new Education(); if (!$id) { // it's new.