PDA

View Full Version : A php file within a php file?


Vtec44
11-22-2005, 03:02 AM
I'm trying to create a today.php, so it will list only the posts within 24hrs. Right now, people on my forum are doing just that by using "http://www.mydomain.com/forums/search.php?do=getdaily". The code I have for today.php file is below. It seems to work, but it doesn't retain the cookie information. So, when people are viewing today.php, it shows the search but only as if the person is a guest, and exclude all the forums availabled for signed in users only. How do I go about to fix this? Keep in mind that I'm not that fluent in PHP at all, thanks!





<?PHP

include('http://www.mydomain.com/forums/search.php?do=getdaily');

?>

Guest190829
11-22-2005, 03:05 AM
Try including global.php too...

Adrian Schneider
11-22-2005, 03:20 AM
You could use a redirect as well.

Vtec44
11-22-2005, 03:36 AM
Thanks for the suggestions. I tried to include global.php by adding require_once('./global.php'); but that didn't seem to work. I tried redirect and that works like a charm, but still curious to see if anyone can suggest a way to recognize cookies. Thanks! :D