Missing close " for one.
v
include("index.php?var='$var'");
^
and you don't need to pass the $var to the include since it will be included,
and obviously you already have it declared.
if index.php contained
<?
echo $var;
?>
and the file you are in contained
<?
$var='blah';
include("index.php");
?>
then PHP reads this as
<?
$var='blah';
echo $var;
?>
as such, no need to pass $var to the file since the file is included then
parsed.
Dave
>-----Original Message-----
>From: Phil Schwarzmann [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, March 14, 2002 4:20 PM
>To: [EMAIL PROTECTED]
>Subject: [PHP] include() question
>
>
>Why doesn't this work...
>
>include("index.php?var='$var');
>
>I want to include a page in my code and send a variable to it but I get
>some funky error.
>
>THANKS!!
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php