Something stopping data entering mysql db
Posted: Mon Jan 17, 2011 2:55 pm
Hi,
I cant seem to find what it is, I've tried everything but the data is echo'ing out okay on the page but it wont insert into my db. I've checked the db connection, that is fine also no typo's that i can see.
HELP
I cant seem to find what it is, I've tried everything but the data is echo'ing out okay on the page but it wont insert into my db. I've checked the db connection, that is fine also no typo's that i can see.
HELP
Code: Select all
<?php include('db.php'); ?>
<?php
$title=$_POST['title'];
$date=$_POST['date'];
$content=$_post['content'];
$date = date('M j, Y H:i', strtotime($date));
?>
<?php
$query="INSERT INTO ccms_news (title, date, content, timestamp) VALUES ('$title', '$date', '$content', 'UNIX_TIMESTAMP($date)')";
mysql_query($query);
echo "Record Updated";
echo $id;
echo '</br>';
echo $title;
echo '</br>';
echo $date;
echo '</br>';
echo '<a href="index.php">CLICK TO CONTINUE</a>';
?>