Ver Mensaje Individual
  #2 (permalink)  
Antiguo 25/02/2013, 12:14
Avatar de stramin
stramin
 
Fecha de Ingreso: marzo-2008
Ubicación: Cubil felino
Mensajes: 1.652
Antigüedad: 16 años, 1 mes
Puntos: 336
Respuesta: problema en toma de decisión

No se puede cambiar el cabezal si ya lo has definido previamente, tienes 2 opciones:

1.- Mover el html más abajo asi:

Código PHP:
Ver original
  1. <?php
  2. //Conexi贸n con el servidor
  3. $con=mysql_connect("localhost","root","");
  4.    if (!$con){die('ERROR DE CONEXION CON MYSQL:'. mysql_error());}
  5. /********* CONECTA CON LA BASE DE DATOS  **************** */
  6. $database = mysql_select_db("aaaaa",$con);
  7. if (!$database){die('ERROR CONEXION CON BD:'.mysql_error());}  
  8. /* ****************************************************** */
  9. //ejecutamos la consulta
  10.             $SQL="Select*From DATOSFISCALES WHERE RFC='".$_POST['rfc']."'";
  11. $result = mysql_query ($SQL);
  12. // verificamos que no haya error
  13. if (! $result){
  14.    header('Location:  datos.php');
  15. exit();
  16. }else { ?>
  17. <title> datos</title>
  18. <form method="post" action="actualia.php">
  19. <table width="200" border="0" align="center" cellspacing="0">
  20.   <tr>
  21.     <td height="148"><img src="log[1].jpg" width="150" height="133" /></td>
  22.     <td><img src="CABESERA.png" width="801" height="144" /></td>
  23.   </tr>
  24. </table> <?php echo "<table width='600' border='0' align='center'>
  25. <tr><td><h3><font color='red'>SI SUS DATOS SON...

2.- Hacerlo con javascript así:

Código PHP:
Ver original
  1. if (! $result){
  2.    echo "<script>document.location.href='datos.php';</script>";
  3. exit();
  4. }else {

Espero te sirva y no haberme equivocado XD
__________________
El objetivo de este foro es orientar al usuario como un favor y no como una obligación.

Yo soy de los que dan puntos por aporte :D