送出端

<body>
<?
  $name = "lee fish";  
  $gid = 1;  
?>
<a href="http://127.0.0.1/test.php?name=<?=$name?>&gid=<?=$gid?>">test</a>
</body>

傳送網址

http://127.0.0.1/test.php?name=lee%20fish&gid=1

接收端

<?
    $userName = $_GET["name"];
    print("hi! ");
    print($userName);
    echo("<br/>Welcome to Hahapoint!");
?>

<form method='post' action='http://tw.yahoo.com'>
   <input type='submit' value="GO! "/>
</form>

 

1

另外一種寫法

在html中連接php變數

    <td><a href="http://sls.csie.fju.edu.tw/user/<? echo "$row_group[0]" ;?>"> <? echo "$row_user[0]"; ?></a></td>

 

用echo的寫法

 echo '<td><a href="http://sls.csie.fju.edu.tw/JO/addIntoJO?name='.$name.'&uid='.$uid.'&gid='.$row_group[1].' " >加入</a></td>
                    </form>    
                </tr> ';                            

arrow
arrow
    全站熱搜

    a22710518 發表在 痞客邦 留言(0) 人氣()