Le Code:
<?PHP
$name = $_POST['name'];
$passcode = $_POST['passcode']; //Don't comment on this, I'll use it after this error is fixed...
$news = $_POST['news'];
try {
//Connect to the database
include 'dbconnect.php';
$updatenews = $pdo->prepare('UPDATE news SET name = :name, news = :news WHERE id = :id');
$updatenews->execute(array(':id' => 1, ':name' => $name, ':news' => $news));
} catch(PDOException $e) {
echo "<p>Sorry, there was an error; " . $e->getMessage() . ".</p>"; //Print out the exception
}
?>

New Topic/Question
Reply




MultiQuote






|