![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
14/11/2008, 07:09
|
![Avatar de hoberwilly](http://static.forosdelweb.com/customavatars/avatar246730_1.gif) | | | Fecha de Ingreso: julio-2008 Ubicación: Lima - Perú
Mensajes: 769
Antigüedad: 16 años, 7 meses Puntos: 2 | |
Respuesta: Falla en arreglo array Gracias por las sugerencias, entonces el codigo queda así (indentado):
agregacarrito2.php
------------------------
<?php
session_start();
if(isset($_SESSION['carro']))
$carro=$_SESSION['carro'];
include('conec.php');
conectarse();
$autori=$_POST["cantidad_autori"];
$id=$_POST["id"];
foreach ($id as $valor){
for($i=0; $i<count($id); $i++)
{
$qry=mysql_query("select * from catalogo where id='".$valor."'");
$row=mysql_fetch_array($qry);
foreach($autori as $valor2)
{
$carro[md5($id)]=array('identificador'=>md5($id),'cantidad'=>$cant idad,'medicamento'=>$row['medicamento'],'presentacion'=>$row['presentacion'],'concentracion'=>$row['concentracion'],'formaFarmaceutica'=>$row['formaFarmaceutica'],'precio'=>$row['precio'],'id'=>$valor,'cantidad_autorizada'=>$valor2);
//return $carro;
}
}
}
print_r($autori);
print_r($id);
print_r($carro);
$_SESSION['carro']=$carro;
header("Location:listadoNoatendido.php?".SID);
?>
gracias por lo que me puedan ayudan... |