Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Aug 2002
    Location
    Oregon, United States of America
    Posts
    882
    Thanks
    1
    Thanked 9 Times in 9 Posts

    include a .php with a variable set in the URL

    PHP Code:
    include("storedisplay.php?SHOWONLY=ALL"); 
    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.
    If I'm postin here, I NEED YOUR HELP!!

  • #2
    Regular Coder
    Join Date
    Oct 2003
    Location
    Australia
    Posts
    112
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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");

  • #3
    Regular Coder
    Join Date
    Aug 2002
    Location
    Oregon, United States of America
    Posts
    882
    Thanks
    1
    Thanked 9 Times in 9 Posts
    i ended up using session to store the value, rather than set it in the URL, so no big.
    If I'm postin here, I NEED YOUR HELP!!

  • #4
    New Coder
    Join Date
    Feb 2004
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •