问:
if(isset($ _POST ['Signup']))
{
$ file_name = $ _FILES ['image'] ['name'];
$ file_tmp = $ _ FILES ['image'] ['tmp_name'];
$ file_ext = strtolower(end(explode('。',$ _ FILES ['image'] ['name']))));
$ a = $ _ POST ['image'];
$ b = $ _ POST ['name'];
$ c = $ _ POST ['fname'];
$ d = $ _ POST ['add'];
$ e = $ _ POST ['contact'];
$ f = $ _ POST ['email'];
$ g = $ _ POST ['ano'];
$ h = $ _ POST ['qual'];
$ i = $ _ POST ['mimage'];
$ j = $ _ POST ['aod'];
$ k = $ _ POST ['psw'];
$ l = $ _ POST ['psw-repeat'];
$ sql =插入到signup(图像,名称,fname,添加,联系人,电子邮件,aadhar,qual,degress,ad,psw,con_psw)值('$ a','$ b','$ c','$ d','$ e','$ f','$ g','$ h','$ i','$ j','$ k','$ l',NOW());
//将图像存储在文件夹中
// $ folder =“ / xampp / htdocs / signup / image /”;
// move_uploaded_file($ _ FILES [“ myimage”] [“ tmp_name”],“ $ folder”。$ _ FILES [“ myimage”] [“ name”]));
move_uploaded_file($ file_tmp,“ / xampp / htdocs / signup / image /".$ file_name);
if($ conn-> query($ sql)=== TRUE)
{
echo“您符合条件”;
}
else
{
echo“ error”。$ sql。“
”。$ conn-> error;
}
//会话开始
// session_start();
//存储会话数据
// $ _ SESSION [“ NAME”] =“ $ b”;
//访问会话数据
//回显$ _SESSION [“ NAME”];
//删除会话数据
// if(isset($ _ SESSION [“ NAME”])){
// unset($ _ SESSION [“ NAME”]));
}
//销毁会话
// session_destroy();
//会话结束
mysqli_close($ conn);
?>
答:插入查询中缺少提交的日期(Now()的字段)