>  기사  >  백엔드 개발  >  php页面传值接接不到值解决方案

php页面传值接接不到值解决方案

WBOY
WBOY원래의
2016-06-13 13:32:53812검색

php页面传值接接不到值
当前页面为tp.php 有一个form表单要传值给当前页面,

当点击之后地址栏的确出现了传值内容 但是当前页面的语句却接不到值

请教各位高人帮忙看看是怎么回事

PHP code
<!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

-->
                       $sql = 'select * from phone';
        
            if(isset($_GET['yy'])){
                echo "hjfkgljfdfffffffffffffff";//经测试 没有输出,即没有接到值
                $screen=$_GET["screen"];
                $moshi=$_GET["moshi"];
                $system=$_GET["system"];
                $xilie=$_GET["xilie"];
                if ($moshi !='0'){
                    if(strpos($sql,'where'))
                        $sql.=' and `p_moshi`='.$moshi;
                    else
                        $sql.=' where `p_moshi`='.$moshi;
                }
                if ($screen!='0'){
                    if(strpos($sql,'where'))
                    $sql.=' and `p_screen`='.$screen;
                    else
                        $sql.=' where `p_screen`='.$screen;
                }
                if ($system!='0'){
                    if(strpos($sql,'where'))
                    $sql.=' and `p_system`='.$system;
                    else
                        $sql.=' where `p_system`='.$system;
                }
                if ($xilie!='0'){
                    if(strpos($sql,'where'))
                    $sql.=' and `p_xilie`='.$xilie;
                    else
                        $sql.=' where `p_xilie`='.$xilie;
                }
            }
            
            
                    echo $sql.'<br>';


下面是这个页面的form表单主要信息
代码中有两个提交的按钮 一个为img 一个为submit  
  不管点击那个哪个都可以传出值 但却接不到 
HTML code
<!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

-->
  •  
  •  
  •  
  •  
  •  
  •  php页面传值接接不到值解决方案
  •  
  •  
성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.