[php]if(isset($_POST[“button”]))
{
$title = $_POST[“title”];
$color = $_POST[“color”];
$message = $_POST[“message”];
$date = date(“m/d/Y”);
$by = $_SESSION[“admin”];
mysql_query(“INSERT INTO Blog (title, date, by, content, color)
VALUES (’$title’, ‘$date’, ‘$by’, ‘$message’, ‘$color’)”) or mysql_error();
$content = ‘Thank you for posting this message.
[Go Back]’;
}
[/php]
It’s not adding to my database, I have connected to it with:
[php]mysql_connect(localhost,“root”,“my password is here”);
mysql_select_db(“Final Resurrection”) or die(“Could not connect to the database”);[/php]
the mysql_error() is doing nothing, but if I put die(“This post has not been added to the database”), it just outputs the die function.