I have a blog type of site and in the admin area I have just a simple html form that will submit a title, the text entry and date to MySQL database. My problem is sometimes after pressing submit the data isn't shown on my page where it's suppose to. But other times it is, I go back to the home page, do ctrl+refresh and still doesn’t update. I then go into phpmyadmin and see if its there and its not. So I go back and enter an entry that’s shorter in length it shows up. So I assumed it was to long. I then just enter the same thing in phpmyadmin for the entry and it worked fine. Any help would be appreciated
my input.php: (it has more code under this that lists all the stuff in the database, it all works fine thats why i'm including db.php, but it doesn't effect whats being POSTed to process.php, at least I dont think so.
<? include 'db.php';
include 'checklogin.php';?>
<body>
<form name="form1" method="post" action="process.php">
<p>
date:
<input name="date" type="text" id="date" value="<?php echo date("F j,Y");?>">
</p>
<p>
title:
<input name="title" type="text" id="title">
</p>
<p> <textarea name="entry" cols="64" rows="10" id="entry"></textarea>
</p>
<p>
<input type="submit" name="Submit" value="Submit">
</p>
</form>
Process.php:
<?
include 'db.php';
$title=$_POST['title']; $entry=$_POST['entry']; $date=$_POST['date'];
mysql_query ("INSERT INTO data (date, title, entry) VALUES ('$date','$title','$entry')");
mysql_close($link);
?>
<p>Submited fine. </p>
<p><a href="../blog.php">go to blog</a> </p>
Thank you.