I have a form im trying to submit, into my MySQL database and its submitting all the records fine accept the 'content' field in my blog table.
Im not sure if this matters but i am using a textarea framework from nicedit.com
UPDATE: I have removed the NicEdit framework and it worked fine submitting as a normal textarea, im not really sure where to go with this now i'll try and take my support over to NicEdit and post a response when i have found a solution to this issue.
HOWEVER i am having another issue and would hate to open a new post about it, my date is inserting as 0000-00-00 and not the current date. Any solution to that?
heres the php post method
<?php
include_once"dbconnection.php";
session_start();
$connect = mysql_connect($host, $username, $password) or die (@mysql_error());
$selectdb = mysql_select_db($database, $connect) or die (@mysql_error());
if(isset($_POST['postblog'])){
$blogtitle = $_POST['blogtitle'];
$blogcontent = $_POST['blogcontent'];
$author = 'Admin';
$query = mysql_query("INSERT INTO blog SET date='date()', title='$blogtitle', author='$author', published='1', content='$blogcontent'");
if ($query == false){
echo "false";
} else {
echo "true";
}
}
?>
and the html form
<form action='postblog.php' method='post'>
<input class="inputMed" type="text" name="blogtitle"> <br />
<textarea style="width: 600px;" name="blogcontent"></textarea> <br />
<input type="submit" name="postblog" id="postblog" value="Post Blog" />
</form>
Thanks in advance