PHP -> jScript popup-> FPDF

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shikimori
    New Member
    • Jan 2008
    • 2

    #1

    PHP -> jScript popup-> FPDF

    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
  • shane3341436
    New Member
    • Mar 2007
    • 63

    #2
    Originally posted by shikimori
    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.

    Comment

    • shikimori
      New Member
      • Jan 2008
      • 2

      #3
      Originally posted by shane3341436
      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????

      Comment

      • shane3341436
        New Member
        • Mar 2007
        • 63

        #4
        Originally posted by shikimori
        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
        Code:
        $_SESSION['index']="some value";
        , you can access $_SESSION['index'] on every page of the website unless u have called
        Code:
        session_start()
        in each page.

        You can go through http://www.php.net/session for more on session

        Comment

        Working...