2022-11-16 00:12来源:m.sf1369.com作者:宇宇
用的是mysql数据库的情况
<?
$db_id=mysql_connect('localhost','用户名','密码');//连接数据库
mysql_select_db('数据库名');
$sql=select a.name from aa as a,bb as b where b.userid=$id;
$result=mysql_query($sql);
$i=0;
while($row=mysql_fetch_array($result)){
$name[$i]=$row[0];
$i++;
}
print_r($name);//结果存在$name这个数组中
?>
[php]if(!empty($area)){? ? ? ? $sqlAdd=\area=\'$area\',\;}else{? ? ? ? $sqlAdd=\\;}$sql = \UPDATE user SET type=\'$type\', password=\'\.md5($password).\\', name=\'$name\', dateofbirth=\'$dateofbirth\', tel=\'$tel\', \.\$sqlAdd\.\ identity=\'$identity\', idcard=\'$idcard\', idcardphoto=\'$idcardphoto\', contractphoto=\'$contractphoto\' WHERE id = $id \;[/php]DZ里的写法
那你就用 get 或者 post 接受一下呗
或者这么 写一个
$goods_id = isset($_REQUEST['id']) ? intval($_REQUEST['id']) : 0;
你看看你是通过 js 还是通过from 提交的