***********************************************************************/ define( 'IS_ADMIN', true ); // include our files require_once( '../ba.blog/values.inc.php' ); // process our form if( $_POST['f'] == 'doNewPost' ) $r = doNewPost( $_POST['d'] ); // basic error handling $msg = ""; if( isset( $r ) ){ switch( $r ){ case 0: $msg = "Post added successfully!"; break; case 1: $msg = "Error: Post text field empty. Post not added."; break; case 2: $msg = "Error: Could not connect to the database. Post not added."; break; default: $msg = "Unknown error!"; } } ?> New Post

New Blog Post