By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,336 Members | 2,315 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,336 IT Pros & Developers. It's quick & easy.

PHP -> jScript popup-> FPDF

P: 2
HI guys i'm newbie here, sorry if my english is not so well, (well i'm rarely using english ^^)
my question is that i'm using PHP to create a report (the report is using FPDF class)
as example if i want to create a sales report based on period defined by the user
so the value of the starting period n the ending period is saved into a variable
to be used for query. now the main problem is when a submit button is pressed and the page is redirected to a page which will display the result of the query in PDF format. but soon i realise that this is a dead end, what sould i do if a want to create another report?? i hit the back button and the page displayed as an expired display and needed to refresh
and i thought it will be better if the PDF page will come on a pop up window, but the problem is if i use the javascript pop up window then the Value stored in session on the php won't be passed to the pop up window?? am i right??

please help me
Jan 4 '08 #1
Share this Question
Share on Google+
3 Replies


shane3341436
P: 63
HI guys i'm newbie here, sorry if my english is not so well, (well i'm rarely using english ^^)
my question is that i'm using PHP to create a report (the report is using FPDF class)
as example if i want to create a sales report based on period defined by the user
so the value of the starting period n the ending period is saved into a variable
to be used for query. now the main problem is when a submit button is pressed and the page is redirected to a page which will display the result of the query in PDF format. but soon i realise that this is a dead end, what sould i do if a want to create another report?? i hit the back button and the page displayed as an expired display and needed to refresh
and i thought it will be better if the PDF page will come on a pop up window, but the problem is if i use the javascript pop up window then the Value stored in session on the php won't be passed to the pop up window?? am i right??

please help me
If u r using session variables why do you need to submit the form. It will be better to use hyperlink to popup another page because the session variables can be accessed on the popped up page easily. If u r not using session variables, you can submit the page to another page where u can print the preview of the report on the html page and put a link or button which will pop up the pdf.
Jan 4 '08 #2

P: 2
If u r using session variables why do you need to submit the form. It will be better to use hyperlink to popup another page because the session variables can be accessed on the popped up page easily. If u r not using session variables, you can submit the page to another page where u can print the preview of the report on the html page and put a link or button which will pop up the pdf.
i'm using session variables, can the pop up window recognize the session variables from the parent page????
Jan 5 '08 #3

shane3341436
P: 63
i'm using session variables, can the pop up window recognize the session variables from the parent page????
session variables are globally recognized.
If u r using
Expand|Select|Wrap|Line Numbers
  1. $_SESSION['index']="some value";
, you can access $_SESSION['index'] on every page of the website unless u have called
Expand|Select|Wrap|Line Numbers
  1. session_start()
in each page.

You can go through http://www.php.net/session for more on session
Jan 5 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.