I have a page with a link that's linking to: art_menu.php?artpage=art_holding
in the art_menu.php page I have an include tag: <? include '($artpage + ".html")'; ?>
It won't work... It gives me this huge error... Here is the page...
Originally posted by HalfLife I have a page with a link that's linking to: art_menu.php?artpage=art_holding in the art_menu.php page I have an include tag: <? include '($artpage + ".html")'; ?> It won't work... It gives me this huge error... Here is the page...
Is the page name a variable your trying to pass in? If so, what you want is: <? include ($artpage.".html"); ?>
and if not, then what you want is:
<? include ('artpage.html'); ?>
hmm...
This is now the code I have: <? include ($artpage.".html"); ?> And it still gives the same error...
Just a side note:
Since you are passing the page name as a variable to an include, you should add some regular expression or something to make sure of the pages they can request. That way you want end up having files dumped you didn't want someone to have access too.
what's the error
and try echoing out $artpage to see what you are getting for a value
Also, make sure that your web server has access to the file your trying to include. On my freebsd box running apache, that would be user www group www.
It doesn't have any problems with eccexxing the file I'm trying to include... And it doesn't seem to echo.... 😕 I added: <? echo $artpage ?> and it doesn't give me any output...
try
echo $_GET['artpage'];
Okay, now I get an echo, the uotput is exactly what I wanted it to be; art_holding (You can see it in the page).
Could the problem be because the variable comes only from the adress bar?
no the problem is that register_globals = Off, and i suggest leaving it that way, but...
when you access vars from the querystring use $GET['varname'], and if you are retrieving vars from a form that is posted, use $POST['varname']
YAAAY!! Thanks!!! It's finally working!!!
now one stupid html question... how do I get my table to be aligned top AND right?