问题
传值,就是添加成功后:
$inssql="insert into lookphoto (lkid,lkphoto,gaid) values ('','".$name."','".$gaid."')"; $result=$obj->exec($inssql); if($result){ echo "<script language=javascript>alert('添加成功!');document.location.href=('zpzs_select.php?gaid=<?=$gaid;?>');</script>"; }
怎么样把gaid==$gaid;?>值传到zpzs_select.php页面去。我是这样写的,但是是错没有传过去。请教一下我,谢谢!
解决方案
echo "<script language=javascript>alert('添加成功!');document.location.href='zpzs_select.php?gaid=".$gaid."';</script>";