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; Link to comment https://forums.phpfreaks.com/topic/210776-indexphpviewcart-versus-cartphp/ 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. Link to comment https://forums.phpfreaks.com/topic/210776-indexphpviewcart-versus-cartphp/#findComment-1099502 Share on other sites More sharing options...
bytesize Posted August 15, 2010 Author Share Posted August 15, 2010 Easy fix! Thank you. Link to comment https://forums.phpfreaks.com/topic/210776-indexphpviewcart-versus-cartphp/#findComment-1099505 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.