Ver Mensaje Individual
  #1 (permalink)  
Antiguo 29/04/2010, 12:16
Avatar de jimylu
jimylu
 
Fecha de Ingreso: noviembre-2006
Ubicación: Perú
Mensajes: 274
Antigüedad: 17 años, 5 meses
Puntos: 5
Pregunta $variable no coje registro mysql_query en el server

Tengo el siguiente problema y me parece raro la verdad tengo el siguiente codigo que el cual consiste en ingresar un numero de pedido y me muestra el detalle completo de ese pedido cuando lo trabajo local me sale ok este codigo el problema es cuando lo subo al servidor la variable $ped y la variable $dtped donde se almacena los mysql_query no coje el valor y me bota como respuesta no cojio los registros y tampoco me muestra los resultados del detalle del pedido.

Alguna sugerencia o como podria hacer para que funcione adecuadamente este codigo en el host.

detallepedidos.php
Código PHP:
<?php 
require_once('conexion/miakar.php');
include 
'funciones/paroimpar.php'
$idped=$_POST['npedido'];

if(
$idped!=NULL){
    echo 
"cod".$idped;
$ped=mysql_query("select * from pedido where id=$idped");
if(
$ped!=NULL){
while(
$rped=mysql_fetch_array($ped)){
    
$cen=$rped['centro'];
    echo 
"centro ".$cen;
}
}else{
    echo 
"no cojio los registros";
}
}
?>
<h3><center>Realizar Descargos</center></h3>
<p></p>
<form name="frm" action="detallepedidos.php" method="post">
<table width="450">
<tr>
<td width="120"><p>Ingresar No. Pedido</p></td>
<td width="150"><input name="npedido" type="text" /></td>
<td width="180"><input name="button" type="submit" id="button" value="Buscar" /></td>
</tr>
</table>
</form>
<?php
$dtped
=mysql_query("select * from detalle_pedido where padre=$idped");
if(
$dtped!=NULL){
                                    
?>
<table width="680" align="center" border="2" bordercolor="#999933" cellpadding="5" cellspacing="0" bgcolor="#D3CBA9">
<tr>
<td> 
<table width="650" align="center" cellspacing="0" cellpadding="0">
<tr>
<td align="center" width="60"><strong>CANT</strong></td>
<td width="85"><strong>COD</strong></td>
<td width="140"><strong>TIPO</strong></td>
<td width="140"><strong>COLOR</strong></td>
<td width="125"><strong>TALLA</strong></td>
<td colspan="2" width="100"><strong>ADMINISTRAR</strong></td>
</tr>
<?php
while($rdtped=mysql_fetch_array($dtped)){
    
$cant=$rdtped['cantidad'];
    
$codprod=$rdtped['cod_producto'];
    
$codtipo=$rdtped['cod_tipo'];
    
$codcolor=$rdtped['cod_color'];
    
$codtalla=$rdtped['cod_talla'];
?>
<tr <?php paroimpar($i); ?>>
 <td align="center"><?php echo $cant?></td>
<td><?php echo $codprod.$codtipo?></td>
<td>
<?php $tip=mysql_query("select descripcion from tipo where tipo_producto=$codtipo");
while(
$rtip=mysql_fetch_array($tip)){
    
$descrip=$rtip[0];
}echo 
$descrip;
?></td>
<td>
<?php $col=mysql_query("select descripcion from colores where cod_color=$codcolor");
while(
$rcol=mysql_fetch_array($col)){
    
$descol=$rcol[0];
}echo 
$descol;
?></td>
 <td>
<?php $tall=mysql_query("select descripcion from tallas where cod_talla=$codtalla");
while(
$rtall=mysql_fetch_array($tall)){
    
$destall=$rtall[0];
}
echo 
$destall;
?></td>
<td><img src="images/editar.png" width="25" height="25" /></td>
<td><img src="images/eliminar.png" width="25" height="25" /></td>
</tr><?php $i++;
}
?>
</table>
</td>
</tr>
</table><?php ?>
__________________
Espero haberte sido de ayuda. :D
www.jminformatics.com