Home >Backend Development >PHP Tutorial >传值,该怎么解决

传值,该怎么解决

PHP中文网
PHP中文网Original
2017-03-21 14:13:50835browse

问题

传值,就是添加成功后:

$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>";
}

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

echo "<script language=javascript>alert(&#39;添加成功!&#39;);document.location.href=&#39;zpzs_select.php?gaid=".$gaid."&#39;;</script>";
Statement:
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