Re: include result from script in midle of other script

From: Date: Sat, 14 Feb 2004 21:09:23 +0000
Subject: Re: include result from script in midle of other script
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-177719@lists.php.net to get a copy of this message
Boneripper wrote:
hi, im trying to do this: ... <BR> <? if ($_SESSION['valores_relativos']) echo '<img src="./5_grafico_total.php">'; else include ("./5_grafico_total.php");?> </FONT> ... and it works perfectly, BUT if i wanna send vars with GET like: ... <BR> <? if ($_SESSION['valores_relativos']) echo '<img src="./5_grafico_total.php?aVar=aValue">'; else include ("./5_grafico_total.php?aVar=aValue");?> </FONT>
include cannot pass variables as in get request, set the variables first and then include the file: <? if ($_SESSION['valores_relativos']) echo '<img src="./5_grafico_total.php?aVar=aValue">'; else { $_GET['aVar'] = 'aValue'; include ("./5_grafico_total.php");?> } ?>

« previous php.general (#177719) next »