<!-- Print Receipt to PDF, Write Form Values to JSON file and Create PDf on the Fly when link is clicked --> <?php $arr = ['pfn' => $pfirstname, 'pln' => $plastname, 'pa1' => $paddress1, 'pa2' => $paddress2, 'ptv' => $ptownvillage, 'pec' => $postcode, 'amo' => $amount]; $temp_name = uniqid(rand(), true) . '.json'; file_put_contents('/var/www/MyWebsite/files/' . $temp_name, json_encode($arr)); ?> <?php echo '<a href="https://mywebsite/pdf.php?q=files/' . $temp_name . '" target="_blank">Download PDF</a>'; ?>
Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.
”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.