Tällänen ostoskorin rakenne
Lisaa.php
<?php if( isset( $_COOKIE[ "ostos" ] ) ) { $ostos = $_COOKIE[ "ostos" ]; $ostos = $ostos."|".$_POST[ "tuote1" ]; setcookie( "ostos", $ostos ); } else { setcookie( "ostos", $_POST[ "tuote1" ] ); } header( "Location: Tuotteet.html" ); ?>
Tuotteet.html
<html>
<head>
<title>Tuotesivu</title>
</head>
<body>
<form action = "Lisaa.php" method = "post">
<input type = "radio" name = "tuote1" value = "makkara">Makkara<br>
<input type = "radio" name = "tuote1" value = "nakki">Nakki<br>
<input type = "radio" name = "tuote1" value = "bratwurst">Bratwurst<br>
<input type = "radio" name = "tuote1" value = "metwurst">Metwurst<br>
<input type = "submit" value = "Lähetä"><input type = "reset" value = "Tyhjennä">
</form>
<a href = "Ostos.php">Näytä ostoskori</a>
</body>
</html>Ostos.php
Aihe on jo aika vanha, joten et voi enää vastata siihen.