0

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']."'
1
  • Explain your question clearly with your code. Commented Feb 10, 2015 at 6:01

2 Answers 2

1

You can use:

<a href="yourscript.php?variable1=one&amp;variable2=two&amp;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']."&amp;pinv=".$row['invno']."'>link</a>

Here is a little explanation about &amp; notation: Encoding issue, coverting &amp; to & for html using php It is better to write html links with entity &amp; 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.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks, need more help, your email
No problem. Please accept the edits on your question, and if the answer is ok, also accept it :). If you have any other problems, please create a new question. Best regards!
0

user amerpsand to add parameters to your url:

<a href='invoice_details.php?ppid=".$row['sno']."&pinv=".$row['invno']."'....

1 Comment

&amp; is much more better here... :).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.