<?php
require_once('DbConnector.php');
if ($HTTP_POST_VARS){
$connector = new DbConnector();
$insertQuery = "INSERT INTO cmss (title,tagline,section,thearticle) VALUES (".
"'".$HTTP_POST_VARS['title']."', ".
"'".$HTTP_POST_VARS['tagline']."', ".
"'".$HTTP_POST_VARS['section'].", ".
"'".$HTTP_POST_VARS['thearticle']."')";
if ($result = $connector->query($insertQuery)){
echo '<center><b>Article added to the database</b></center><br>';
}else{
exit('<center>Sorry, there was an error saving to the database</center>');
}
}
?>