|
|
@ -17,13 +17,12 @@ if(!is_null($title)){
|
|
|
|
$conn = $pdo;
|
|
|
|
$conn = $pdo;
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
$sql = "INSERT INTO article ( title, body ) values ( '$title', '$body' );";
|
|
|
|
$sql = "INSERT INTO article ( title, body ) values ( '$title', '$body' );";
|
|
|
|
echo $sql;
|
|
|
|
|
|
|
|
$conn->exec($sql);
|
|
|
|
$conn->exec($sql);
|
|
|
|
} catch (PDOException $e) {
|
|
|
|
} catch (PDOException $e) {
|
|
|
|
echo "Error in $from: Not Found";
|
|
|
|
echo "Error in $from: Not Found";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//header("location: ../insertWhat.php");
|
|
|
|
header("location: ../insertWhat.php");
|
|
|
|
|
|
|
|
|
|
|
|
?>
|
|
|
|
?>
|
|
|
|
<!DOCTYPE html>
|
|
|
|
<!DOCTYPE html>
|
|
|
|