$sql = "INSERT INTO memberadd (username,password,profilepic) VALUES ('$username','$password','$profilepic')";
上面的代码是注册图片上传
$imagedataprofile = "INSERT INTO imagedbgallery (postid,imageupload) VALUES ('$postid','$profilepic')";
上面的代码试图将数据传递到另一个表
我的 memberadd 表(下)
用户名(PK) | 用户名 | 密码 | 用户照片
我的 imagedbgallery 表(下)
imageid(PK) | 用户名 | 图片上传
我试图实现的事情是,当用户插入记录时: memberadd 表将显示
1 | tommy | 12345 |tommyprofile.png
并且在 imagedbgallery 表中将显示
1,1,tommyprofile.png
==================================================== ========================= 但是当我尝试运行代码时,
memberadd 表将显示
1 | tommy | 12345 |tommyprofile.png
并且在 imagedbgallery 表中将显示
1,0,tommyprofile.png