每个人..
尝试提交表单.. 表单和 php 代码在同一个文件 index.php 中
if(isset($_POST['post_form'])) {
echo "ISSET";
$post_sender=$id;
$post_reciever=$id2;
$post_cont=$_POST['news_text'];
$post_cont=htmlentities($post_cont);
$post_cont=mysql_real_escape_string($post_cont);
$post_sql=mysql_query("INSERT INTO wall_posts (from, to, content, date) VALUES ('$post_sender','$post_reciever','$post_cont',now())") or die(mysql_error());
}else{
echo "NOT SET";
}
html表单
<form method='POST' action='index.php' enctype='multipart/form-data' id='news_form' name='post_form' >
<textarea id='news_text' name='news_text' >type here..........</textarea>
<input type='submit' id='wall_post_btn' name='wall_post_btn' value='submit'>
</form>
我的错在哪里..???
代码没有错误..文件本身已损坏..刚刚在一个新的PHP文件中进行了测试...工作得很好...谢谢大家..