sistema de pedidos

carli
24 de Febrero del 2004
Hola:
Estoy realizando un sistema de pedidos por internet con el siguiente código php:
<?php //
session_start();
session_register('itemsEnCesta');
$item=$_POST['item'];
$cantidad=$_POST['cantidad'];
$itemsEnCesta=$_SESSION['itemsEnCesta'];

if ($item){
if (!isset($itemsEnCesta)){
$itemsEnCesta[$item]=$cantidad;
}else{
foreach($itemsEnCesta as $k => $v){
if ($item==$k){
$itemsEnCesta[$k]+=$cantidad;
$encontrado=1;
}
}
if (!$encontrado) $itemsEnCesta[$item]=$cantidad;
}
}
$_SESSION['itemsEnCesta']=$itemsEnCesta;
?>
<html>
<head>
<style type="text/css">
<!--
.textopedido {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
font-style: italic;
font-weight: normal;
font-variant: normal;
color: #006666;
text-decoration: blink;
text-align: left;
border: medium outset #C32436;
}
-->
</style>
<style type="text/css">
.boton{
font-size:10px;
font-family:Verdana,Helvetica;
font-weight:bold;
color:white;
background:#C32436;
border:0px;
width:80px;
height:19px;
}
</style>
<Style Type="text/css">
<!--
body
{
scrollbar-base-color: #C32436;
scrollbar-arrow-color: #000000;
scrollbar-darkshadow-color: #999999;
scrollbar-face-color: #999999;
scrollbar-highlight-color: #C32436;
scrollbar-shadow-color: #C32436;
scrollbar-3dlight-color: #C32436;
}
-->
</Style>
</head>
<body>
<tt>
<form action="<?=$PHP_SELF."".$SID?>" method="post">
<p><font color="#000000" size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Productos</strong></font><br>
<select name="item" size="1" id="item">
<option value="ENTRADAS">ENTRADAS</option>
<option value="revuelto">revuelto</option>
<option value="pimientos">pimientos</option>
<option value="CARNES">CARNES</option>
<option value="solomillo">solomillo</option>
<option value="escalopines">escalopines</option>
</select>
<tt><tt><tt><tt><tt><tt><tt><tt>
<input name="submit" type="submit" class="boton" value="A&ntilde;adir ">
</tt></tt></tt></tt></tt></tt></tt></tt> <br>
<br><tt>
</form>

<form name="form1" method="post" action="form.php">

<p>
<textarea name="pedido" cols="22" rows="10" class="textopedido" id="pedido">

<?
if (isset($itemsEnCesta)){
echo'El contenido del pedido es:
';
foreach($itemsEnCesta as $k => $v){
echo''.$k.' '.$v.'
';
}
}
?>
</textarea>
</p>
<p><font color="#000000" size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>&iquest;Para
cuantas personas?:
<input name="personas" type="text" id="personas" size="17" maxlength="999999">
</strong></font></p>
<p><strong><font color="#000000" size="2" face="Verdana, Arial, Helvetica, sans-serif">Tel&eacute;fono
de contacto:
<input name="telefono" type="text" id="telefono" size="30" maxlength="10000">
</font></strong></p>
<p>
<input type="submit" name="Submit" value="Enviar" class="boton">
<input type="button" name="imprimir" value="Imprimir" class="boton" onclick="window.print();">
</p>
</form>
</body>
</html>

Lo podeis ver en http://www.grafik-estudio.com/loriga/menu/carro6.php

El caso es que yo quisiera poder añadir varios desplegables, como el que hay, que vayan añadiendo los resultados en el pedido final. Mis conocimientos sobre php son muy escasos así que agradecería alguna orientacion sobre el tema