Ver Mensaje Individual
  #1  
Antiguo 13-09-2007
dark_monk9 dark_monk9 is offline
Miembro
 
Registrado: ago 2007
Posts: 22
Reputación: 0
dark_monk9 Va por buen camino
Error: you don´t have...

Wenas a todos, tengo el siguiente problema, estoy ejecutando un código en php. el cuál tiene
dos edits y un boton para enviar los datos pero cuando doy click en el botón para enviar
la información me aparece este mensaje:

Forbidden

You don't have permission to access /< on this server.

Estoy utilizando el Wampserver versión 5

El código es 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>
<body>
<tt>
<form action="<?=$PHP_SELF.'?'.$SID?>" method="post">
Dime el producto <input type="text" name="item" size="20"><br>
Cuantas unidades <input type="text" name="cantidad" size="20"><br>
<input type="submit" value="Añadir a la cesta"><br>
</form>
<?php
if (isset($itemsEnCesta)){
   echo
'El contenido de la cesta de la compra es:<br>';
   foreach(
$itemsEnCesta as $k => $v){
      echo 
'Artículo: '.$k.' ud: '.$v.'<br>';
   }
}
?>
</tt>
</body>
</html>
Gracias a todos!!!!!!!
Responder Con Cita