Essentially, I have written a simple PHP script that takes the data from a form and puts it in a MySQL database. My host got hacked recently and therefore I lost it. Upon re-adding the tables and such and re-uploading the code, it now posts with no errors to the database but the fields are blank (except the date) and I have no idea whether this has come from a mistake in the coding, writing of the databases (do the fields need specific settings to accept text data other than changing the type field to TEXT) or something else out of my control? I add the form code and form processing code below to see if anyone notices anything particularly odd!
<form action="processform.php" method="post"> <textarea cols=50 rows=1 name="titleof"></textarea> <textarea cols=50 rows=20 name="blogcontents">Blog Here!</textarea> <input type="submit" value="Post It" align="center"> </form>
<?php include("URL"); $connection = mysql_connect($blah,$blah,$blah) or die ("Couldn't connect to the database."); $db = mysql_select_db($database) or die ("Couldn't select the database."); $today = date("Y-m-d"); $query = "INSERT INTO EdBlog ( DateField, CommentField, TitleField) VALUES ('$today','$blogcontents','$titleof')"; $result = mysql_query($query) or die ("Couldn't add the blog."); ?>