传值,该怎么解决

PHP中文网
Release: 2023-02-28 13:02:02
Original
809 people have browsed it

问题

传值,就是添加成功后:

$inssql="insert into lookphoto (lkid,lkphoto,gaid) values ('','".$name."','".$gaid."')";
$result=$obj->exec($inssql);
if($result){
echo "<script language=javascript>alert(&#39;添加成功!&#39;);document.location.href=(&#39;zpzs_select.php?gaid=<?=$gaid;?>&#39;);</script>";
}
Copy after login

怎么样把gaid=值传到zpzs_select.php页面去。我是这样写的,但是是错没有传过去。请教一下我,谢谢!
解决方案

echo "<script language=javascript>alert(&#39;添加成功!&#39;);document.location.href=&#39;zpzs_select.php?gaid=".$gaid."&#39;;</script>";
Copy after login
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template