Why can't I write code? & Nbsp; & lt; a & nbsp; hrefstudent_voice.php? Doadd & gt; add exam & lt; a & gt; php code: if ($ _ GET [do] add) {& nbsp; include & nbsp; DedeIncl why can't I write code?
Add exam
Php code:
if($_GET['do']=='add'){
include DedeInclude('templets/student/student_voice_add.htm');
$id = $_POST['username'];
$email = $_POST['email'];
$content = $_POST['content'];
$time = date('Y-m-d H:i:s');
$category = $_POST['category'];
$flag = $_POST['flags'];
$flags=implode(",",$flag);
$checked = $_POST['checked'];
//echo $id."
".$email."
".$content."
".$time."
".$category."
".$flags."
".$checked;
$sql = "INSERT INTO djs_skstudent_voice (username ,content ,time ,category ,checked ,email ,flag)VALUES ('$id','$content', '$time' , '$category', '$checked','$email','$flags')";
$dsql->ExecuteNoneQuery($sql);
But can be added. However, it will add a blank value for all values. Then you want to add it. That is to say, he will first execute all SQL statements with null values. What's going on?
Share: More
------ Solution --------------------
Before running the command, output the SQL statement.
$ SQL = "INSERT INTO djs_skstudent_voice (username, content, time, category, checked, email, flag) VALUES ('$ ID',' $ content', '$ time ', '$ category', '$ checked',' $ email ',' $ flags ')";
Die ($ SQL );
------ Solution --------------------
Click the link in get mode.
$ _ POST array cannot have a value