Jump to content

index.php?view=cart versus cart.php


bytesize

Recommended Posts

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

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.

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.