undefined index from different carts
I have 4 different pages with add to cart buttons that all sent different session variables to the same "display manager" page. Is there 1 place that I could php code something like this to stop the error:
<?php
if(isset($_SESSION['cost'])){
$_SESSION['cost'] = $_SESSION['cost'];}
else
{ $_SESSION['cost'] = "";}
?>
I tried placing this code in display manager and in "WA_eCart\ eCart.php and still I get the below error. Because different data is sent from the different pages I get the following error for this particular variable. Thanks
Notice: Undefined index: cost in C:\wamp\www\Long Multi Shores\WA_eCart\ambCart_PHP.php on line 301