72 users online (0 members and 72 guests)  

  Results 1 to 1 of 1


  1. convert a perl variable to javascript variable    Forum: Javascript Forum
    Replies: 0
  2. How to pass an array through a form?    Forum: CGI Perl Forum
    Replies: 1
  3. Replies: 3
  4. Pass variable between php scripts.    Forum: PHP Forum
    Replies: 5
  5. Replies: 5
  1. #1
    Tiziano's Avatar
    New User

    Join Date
    Sep 2010

    Help: how to pass Global variable with PHP in iFrame

    Hi all,

    in an iFrame page, I'm loading a php page. This PHP page, must be viewe - only - using the page with the iFrame and not calling it directly.
    So that I did something like that, and I got an issue:

    PAGE WITH iFRAME ( calling page )

    PHP Code:
    iframe src="phppage.php"></iframe>

    the PHP page is made in this way:

    PHP Code:
    if (!defined('IN_SITE')) {

    $pag = <<< FORM
    h1>TEST TEST TEST</h1>
    The problem is that the PHP page doesn't read at all the fariabel 'IN_SITE' ... in other words, I don't know hot to pass, with iFrame, the variable 'IN_SITE' to the called page.

    I no want to use GET method at all, because it's easier to cheat the system. As I said: I no want that the PHP Page is called directly ... she must be calleed and viewed ONLY by the calling page.

    What can I do please ?

    Thank you very much in advance
    Last edited by Tiziano; 09-24-2010 at 02:10 PM. Reason: Little syntaxis correction