Hi All!
MizzHellz, if you want to implement a useful cart (which you can add 2 or more items), you will need to use sessions (as recommended by aschk).
Additionally you will be passing (HTTP variables) between pages (as recommended by ashish_mat1979).
But I warn you about the security of your application.
Don't forget to sanitize all user input, be it taken from forms or urls.
For example, from the code recommended by ashish_mat1979, you should sanitize the ProductID like:
Code:
// Cast the product id to integer.
$prodID = (int)$_REQUEST["ProductID"];
Casting the product id to integer avoids SQL Injection.
Beware of these pontetial threats to your application:
1. SQL Injection
2. Cross Site Scripting (XSS).
If you need more information about (web) application security, please let me know!
Cheers,
Leonel Machava