bokanegro
06-05-2010, 11:32 PM
Hello,
Can anyone help me with fixing this notice. I don't wont to disable errors with php.ini, I wish to fix this.
I'm working on localhost, php version is 5.3.0:
Red is error line.
if ($_SERVER['REQUEST_METHOD'] == 'POST' ) {
$id = $_POST['id'];
switch ($_POST['action']) {
case 'add':
$cart->addItem($id, $products[$id]->name, $_POST['qty'], $products[$id]->price, $products[$id]->weight, $products[$id]->url);
break;
case 'remove':
$cart->removeItem($id);
break;
case 'empty':
$cart->removeAll();
session_destroy();
break;
}
}
Thanks for you time
Can anyone help me with fixing this notice. I don't wont to disable errors with php.ini, I wish to fix this.
I'm working on localhost, php version is 5.3.0:
Red is error line.
if ($_SERVER['REQUEST_METHOD'] == 'POST' ) {
$id = $_POST['id'];
switch ($_POST['action']) {
case 'add':
$cart->addItem($id, $products[$id]->name, $_POST['qty'], $products[$id]->price, $products[$id]->weight, $products[$id]->url);
break;
case 'remove':
$cart->removeItem($id);
break;
case 'empty':
$cart->removeAll();
session_destroy();
break;
}
}
Thanks for you time