I am redirecting php page with following
<a href='invoice_details.php?ppid=".$row['sno']."'..
but I want to redirect the same with some another condition can this be done
<a href='invoice_details.php?ppid=".$row['sno']." and 'invoice_details.php?pinv=".$row['invno']."'
You can use:
<a href="yourscript.php?variable1=one&variable2=two&variable3=three">Link</a>
And then in php:
$variable1 = $_GET['variable1']; // one
$variable2 = $_GET['variable2']; // two
$variable3 = $_GET['variable3']; // three
In your example:
<a href='invoice_details.php?ppid=".$row['sno']."&pinv=".$row['invno']."'>link</a>
Here is a little explanation about &
notation: Encoding issue, coverting & to & for html using php It is better to write html links with entity &
then simple &
.
More docs on get: http://php.net/manual/en/reserved.variables.get.php . Remember to run some check on your get values, and not save / post them directly on site as this can make some security issues.
用户amerpsand将参数添加到您的网址:
<a href='invoice_details.php?ppid=".$row['sno']."&pinv=".$row['invno']."'....
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.