Pls, can any one tell me what is worng with this code?
when i run it , this is what i get
[There was an error with the database. It has been logged.]
any help?
Thanks.
<?php
session_start();
$navtype = $_GET["nav"];
include "config.php";
?>
<?php
if($navtype == "mail")
{
$username = $_POST['username'];
$title = $_POST['title'];
$description = $_POST['description'];
$sql = "INSERT INTO inbox (username, title, description, datesent, timesent)
VALUES('$username', '$title', '$description', NOW(), CURTIME())";
"$qsuccess = mysql_query($sql)";
if(!$qsuccess)
{
error_log("Query failed. MySQL error: " . mysql_error() . "\nQuery submitted: " . $sql . "\n", 3);
die("There was an error with the database. It has been logged.");
}
echo "<center><p><br><br><br><strong>The new $title has been added to the database</strong></p></form>";
}
?>
accra 1 Junior Poster in Training
Agarsia 0 Junior Poster
accra 1 Junior Poster in Training
accra 1 Junior Poster in Training
Javvy -1 Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.