Re: include() question
| From: | Lars Torben Wilson | Date: | Thu, 14 Mar 2002 22:17:16 +0000 |
| Subject: | Re: include() question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-88585@lists.php.net to get a copy of this message | ||
On Thu, 2002-03-14 at 13:20, Phil Schwarzmann wrote:
> 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!!
Please read this page carefully, especially the third paragraph and
Examples 11.3 and 11.5:
http://www.php.net/manual/en/function.include.php
Hopefully that's help clear it up.
Essentially, you should be doing this:
$var = 'someval';
include('index.php');
Hope this helps,
Torben
--
Torben Wilson <torben@php.net>
http://www.thebuttlesschaps.com
http://www.hybrid17.com
http://www.inflatableeye.com
+1.604.709.0506