All pastes #991138 Raw Edit

Unnamed

public text v1 · immutable
#991138 ·published 2008-04-20 19:12 UTC
rendered paste body
<?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>');

    }
}
?>