I am downloading a PDF that gets generated from a php file through GeneratePDF.php
. However I would like to open another php file that downloads another PDF. I would like to achieve this with one single click using ahref tag. How do I achieve this?
Set of phps I would like to open with one single click:
GeneratePDF.php
GeneratePDF2.php
<?php
session_start();
//
<td><a href="GeneratePDF.php" target="_blank"><button id="pdf" name="generate_pdf" class="btn btn-primary"><i class="fa fa-pdf"" ></i>PDFs download</button></a></td>
//
?>
EDIT: Most importantly, how do I use onclick() function inside my above code. I am using php and the code given below does not really work. What am I doing wrong?
<td><a href="GeneratePDF.php" onclick= "window.open('GeneratePDF2.php');" target="_blank"><button id="pdf" name="generate_pdf" class="btn btn-primary"><i class="fa fa-pdf"" ></i>PDFs download</button></a></td>