Jump to content

Location href not adding PHP GET address


penislandbic

Recommended Posts

I'm trying to use JavaScript to redirect to a PHP page that GETs a logout variable and checks to see if it's true.

This is what I have

function logout()
{
    window.location.href = "index.php?logout=true";   
}

When I invoke the logout() function, it redirects to "index.php?". It completely ignores the "logout=true" part.

How can I fix this?

that doesn't sound like a problem with javascript, but a problem with server-side settings or coding. Ex: .htaccess mod rewrite doing a redirect and not passing the query string, or code in index.php itself doing a redirect and not passing the query string

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.