html表單通過PHP提交到MySQL存儲?
cj.php代碼示例如下:
<?php$conn=@MySQL_connect("數據庫","帳號","密碼") or die(mysql_error()); @mysql_select_db('數據表名',$conn) or die(mysql_error()); $sqlstr = "insert into 數據表名(xm,xxmc,zy,szd,qq,yx,tel,radio,bz) values('" .$_POST['xm']."','" .$_POST['xxmc']."','" .$_POST['zy']."','" .$_POST['szd']."','" .$_POST['qq']."','" .$_POST['yx']."','" .$_POST['tel']."','" .$_POST['radio']."','" .$_POST['bz']."')";mysql_query($sqlstr) or die(mysql_error());