[英]How I can redirect php page with 2 variables
我正在使用以下重定向php頁面
<a href='invoice_details.php?ppid=".$row['sno']."'..
但是我想用其他條件重定向相同的東西可以做到這一點
<a href='invoice_details.php?ppid=".$row['sno']." and 'invoice_details.php?pinv=".$row['invno']."'
您可以使用:
<a href="yourscript.php?variable1=one&variable2=two&variable3=three">Link</a>
然后在php中:
$variable1 = $_GET['variable1']; // one
$variable2 = $_GET['variable2']; // two
$variable3 = $_GET['variable3']; // three
在您的示例中:
<a href='invoice_details.php?ppid=".$row['sno']."&pinv=".$row['invno']."'>link</a>
這是有關&
的一些解釋&
表示法: 編碼問題,包括&amp; 到&用於使用php的html最好使用實體&
編寫html鏈接&
然后簡單&
。
獲取更多文檔: http : //php.net/manual/en/reserved.variables.get.php 。 請記住對獲取的值進行一些檢查,而不要直接在站點上保存/發布它們,因為這可能會帶來一些安全問題。
用戶amerpsand將參數添加到您的網址:
<a href='invoice_details.php?ppid=".$row['sno']."&pinv=".$row['invno']."'....
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.