Welcome Guest, Not a member yet? Register   Sign In
help
#1

[eluser]sHoyRu777[/eluser]
hello.. i am really a noob in CI and i am practicing CI by making a shopping cart system or what do you call that.. (dont mind my english)... i want to make my cart session, i have already done that with native php coding(heres my code) :

<?
if(isset($_GET[‘product_id’])){
$_SESSION[‘product’][$_GET[‘product_id’]]++;
}
?>
<?
if(isset($_POST[‘btn’])){
switch($_POST[‘btn’]){
case “Update” :
foreach($_POST[‘hidden_lodge’] as $Key => $Index){
$_SESSION[‘product’][$Index] = $_POST[‘txt_qty’][$Key];
}
break;
case “Remove” :
foreach($_POST[‘chk_remove’] as $index){
unset($_SESSION[‘product’][$index]);
}
break;
case “Continue Shopping” :
echo ”[removed][removed]=‘products.php’[removed]”;
break;
}
}
?>

and i am really2x confused on how will i convert that into CI code.. im really confuse on CI’s Sessions ... Please help… ^_^




Theme © iAndrew 2016 - Forum software by © MyBB