如果将100改成其它字符,网页正文也跟着改变,这个应该怎样写?

解决方案 »

  1.   


    echo substr($_SERVER["QUERY_STRING"], 1);
      

  2.   

    http://localhost/index.php?page=100&
    用JS提交
    var xmlHttp1112
    function showUser219()

    xmlHttp1112=GetXmlHttpObject1112()
    if (xmlHttp1112==null)
     {
     alert ("Browser does not support HTTP Request")
     return
     }var url1="indexbs219.php"
    var getnam=100
    url1=url1+"?p="+getnam
    url1=url1+"&sid="+Math.random()
    xmlHttp1112.onreadystatechange=stateChanged1112 
    xmlHttp1112.open("GET",url1,true)
    xmlHttp1112.send(null)
    }function stateChanged1112() 

    if (xmlHttp1112.readyState==4 || xmlHttp1112.readyState=="complete")
     { 
     document.getElementById("content1").innerHTML=xmlHttp1112.responseText 
     } 
    }function GetXmlHttpObject1112()
    {
    var xmlHttp1112=null;
    try
     {
     // Firefox, Opera 8.0+, Safari
     xmlHttp1112=new XMLHttpRequest();
     }
    catch (e)
     {
     //Internet Explorer
     try
      {
      xmlHttp1112=new ActiveXObject("Msxml2.XMLHTTP");
      }
     catch (e)
      {
      xmlHttp1112=new ActiveXObject("Microsoft.XMLHTTP");
      }
     }
    return xmlHttp1112;
    }
    ==========================
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>tranfor</title>
    </head><?php
    $con = mysql_connect("localhost","root","888888");if (!$con)
      {
      die('Could not connect: ' . mysql_error());
      }
    mysql_query("set names gb2312");
    $getflowid=$_GET["p"];
    $getnampc=$_GET["qa"];
    $getnamhs=$_GET["qb"];
    $getvalpc=$_GET["qc"];
    $getunitpc=$_GET["qd"];
    $getmaospc1=$_GET["qe"];
    获取变量并使用
      

  3.   

    例如:
    http://localhost/index.php?id=100在index.php页面加入if(isset($_GET['id']))
    {
       $id=$_GET['id'];
       //这个id应该是作为数据库里面某个表的primary key,根据这个id来调用数据库里的数据,然后显示数来
       echo $id;
    }
      

  4.   

    很久没上了发现帐号密码错误,然后找回密码发现EMAIL不是我的,重新注册,没有发帖子权限,愁死!我也想实现这个效果不知道怎么操作我想在一个页面调用该页面的ID  如下:http://localhost/download.php?id=234在这个页面调用234不知道用PHP如何调用比如
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <title></title>
    </head>
    <table width="600" border="1" align="center" cellpadding="10" cellspacing="0" bordercolor="#FF0000">
      <tr>
        <td>在这里调用ID</td>
      </tr>
    </table>
    <body>
    </body>
    </html>知道的说下,最好详细点,比较菜,谢谢了!