$mql="insert into user(uname,uage,passwd) value('"$uname"','"$uage"','"$passw"')" ;
浏览器反馈的错误是syntax error, unexpected T_VARIABLE,错在何处,正确的写法是什么?
天蓬老师2019-04-18 15:04:33
正确语法:
$mql = "INSERT INTO `user` (`uname`, `uage`, `passwd`) VALUES ('{$uname}', {$uage}, '{$passwd}')";
或者:
$mql = "INSERT INTO `user` SET `uname` = '{$uname}', `uage` = {$uage}, `passwd` = '{$passwd}'";