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 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Sep 2013
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Php (Header) (session?) Something which knows you are 'logged in' Or clicked a btn

    Hi,
    I have a site which looks like this

    /index/
    ----/overview/
    ----/item/

    on index id like to add a button saying 'dist' when pressing dist
    id like you to come to the overview page, but since you pressed 'dist' id like the php to know that and add something like '?dist' after each url. So if one clicked dist it would result in '/overview/?dist' '/item/?dist' if you didnt click dist it would just be /overview/ or /item/.

    There's no need for a password, anyone can click 'dist'

    this is because id like to alter the html with jQuery
    if (window.location.href.indexOf("?dist") != -1) { }

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,987
    Thanks
    4
    Thanked 2,660 Times in 2,629 Posts
    I don't see a reason for PHP here at all. The button can be used either with the JS to give it the querystring, or it can be used in a GET form to provide the dist value.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 


  •  

    Posting Permissions

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