Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
[ Posted by Marlon Mendoza ] addtocartprocess.php
if (session_status() == PHP_SESSION_NONE) {
//there is a session start code here but the website disabled it
$_SESSION['cart'] = array();
$connection = mysql_connect("localhost", "root", "");
array_push($_SESSION['cart'], $_GET['product_id']);
header("location: ../android.php?id=" . $_GET['product_id'] . "");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment