That's all I needed to know. Thanksfeyd wrote:The value you give to include() can only be a file location. Nothing else.
Include pages with variables in URL
Moderator: General Moderators
-
MarkAshley
- Forum Commoner
- Posts: 34
- Joined: Fri Nov 18, 2005 1:36 am
-
MarkAshley
- Forum Commoner
- Posts: 34
- Joined: Fri Nov 18, 2005 1:36 am
if you're hell bent on using get vars, and you don't want to include them in your url just set them above your include.
ie:
ie:
Code: Select all
$_GET['something'] = "some value";
include('somefile.php');- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
If you have the value to populate the querystring then you have the values you need use in the included file.MarkAshley wrote:I have a requirement to pass a page and some variables to a script, which get included. The variables which also get included aren't the same every time. So I have to store the variables somewhere else and then retrieve them later. It would be easier if I could just add them to the URL I include().