' . $_GET['choice'] . ''; } else { $trolley = '
  • ' . $_GET['choice'] . '
  • '; } setcookie('Trolley',$trolley); } //} ?> \n" ?> PHP cookie example

    Shopping trolley

    PHP cookie version

    Choose an item:

    camera
    snorkel
    octopus
    cuddly toy

    Trolley currently empty

    '; } else { echo '

    Trolley contains:

    '; } ?>

    Return to the PHP notes