$sql = "INSERT INTO $table_name VALUES
('$_POST[firstname]', '$_POST[lastname]', '$_POST[username]', password('$_POST[password]'), 'Users', '', '', '$pchange',
'$_POST[email]', '$default_url', '$verify', '', 0, '', 0)";
$result = @mysql_query($sql,$connection) or die(mysql_error());
$sql、$connection 和 $table_name 都是有效的,并且以前在脚本和数据库中使用过,这就是我的数据库的样子:
firstname varchar(20) latin1_swedish_ci Yes NULL Change Drop More
lastname varchar(20) latin1_swedish_ci Yes NULL Change Drop More
username varchar(20) latin1_swedish_ci Yes NULL Change Drop More
password varchar(50) latin1_swedish_ci Yes NULL Change Drop More
group1 varchar(20) latin1_swedish_ci Yes NULL Change Drop More
group2 varchar(20) latin1_swedish_ci Yes NULL Change Drop More
group3 varchar(20) latin1_swedish_ci Yes NULL Change Drop More
pchange varchar(1) latin1_swedish_ci Yes NULL Change Drop More
email varchar(100)latin1_swedish_ci Yes NULL Change Drop More
redirect varchar(100)latin1_swedish_ci Yes NULL Change Drop More
verified varchar(1) latin1_swedish_ci Yes NULL Change Drop More
last_login date Yes NULL Change Drop More
balance double UNSIGNED Yes 0 Change Drop More
address varchar(60) latin1_swedish_ci Yes NULL Change Drop More
lostbalance double Yes 0 Change Drop More
提前致谢。