bytesize Posted August 15, 2010 Share Posted August 15, 2010 How can I make index.php?view=cart work in place of cart.php in the following code? Works: header("Location: cart.php?msg=Thank you. Check your e-mail for Login details."); die; } else header("Location: cart.php?msg=Account with given email does not exist."); die; Doesn't work: header("Location: index.php?view=cart?msg=Thank you. Check your e-mail for Login details."); die; } else header("Location: index.php?view=cart?msg=Account with given email does not exist."); die; Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted August 15, 2010 Share Posted August 15, 2010 The query string seperator is an ampersand (&) not a question mark. However you shouln't be passing messages over the url. You should prehaps pass the error message using a session or cookie. If you're going to pass messages over the url then you should atleast urlencode it. Quote Link to comment Share on other sites More sharing options...
bytesize Posted August 15, 2010 Author Share Posted August 15, 2010 Easy fix! Thank you. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.