View pdf in another browser tab with php


Good afternoon people,

Next, I created a quote form in php and I request that the user, when visiting my website, can request the quote and send it to my database. So I would like that, as soon as he clicks send (Remembering that when I send I redirect to another page in java script) I can already open a general budget in pdf format in a new browser tab that will already be in one of my pages. folders on the website. can anybody help me?


Use this code, which will open the file in the browser itself. Preferably use Google Chrome.

header("Content-type: application/pdf");
header("Content-Disposition: inline; filename=nome.pdf");
Scroll to Top