Ver Mensaje Individual
  #1 (permalink)  
Antiguo 05/12/2008, 07:54
clusterbit
 
Fecha de Ingreso: octubre-2008
Mensajes: 67
Antigüedad: 15 años, 6 meses
Puntos: 0
no muestra datos en formulario php

Buenas, tengo este pequeño detalle creo yo en el formulario que estoy haciendo
que es una especie de buscar una maquina por su numero de serie y al seleccionar
los datos en la base de datos no me muestra los datos en el formulario nose que estoy haciendo mal o que cosa me falta

probe la consulta en el mysql-front y funciona correctamente.

saludos aka les dejo el codigo

Código PHP:
<?php
ob_start
();

include(
"../config.php"); 

// connect to the mysql server 
$link mysql_connect($server$db_user$db_pass
or die (
"Could not connect to mysql because ".mysql_error()); 

// select the database
mysql_select_db($database
or die (
"Could not select database because ".mysql_error()); 

$match "Select td_atencion.*, td_serv_real.*, td_maquina.*From (((td_histo inner join td_atencion on td_histo.ate_id=td_atencion.aten_id) inner join td_serv_real on td_histo.serv_id=td_serv_real.serv_id ) inner join td_maquina on td_histo.maq_id=td_maquina.maq_id) where td_maquina.maq_serie ='".$_POST['maq']."';";

$qry mysql_query($match
or die (
"Could not match data because ".mysql_error()); 
$num_rows mysql_num_rows($qry); 

if (
$num_rows <= 0) { 
echo 
"Lo Sentimos la serie ingresada no esta registrada: <strong>".$_POST['maq']."</strong><br>"
echo 
"<a href=detalle_maquina.php>Por Favor Ingrese Serie Nuevamente!</a>"
exit;



ob_end_flush();
?>
ese es el archivo buscar