View Full Version : include a .php with a variable set in the URL

10-18-2004, 04:05 AM

This works without the variable being set in the URL, but not with it. Is there another way i acn do the same thing? I was thinking i could just put in a java script (inside a PHP if) that would redirect to this page, but that wouldn't be universile. So im not sure.

10-18-2004, 06:09 AM
I'm not sure but I think that wouldnt work. Correct me if I'm wrong. I tried something similar before and I got mine to work by setting $SHOWONLY=ALL; before I include the file. include("storedisplay.php");

10-18-2004, 06:11 AM
i ended up using session to store the value, rather than set it in the URL, so no big.

10-18-2004, 12:32 PM
If you want to have a query string on an included file you have to include it with it's full http:// address. E.G.

include( 'http://www.domain.com/storedisplay.php?SHOWONLY=ALL' );