Ver Mensaje Individual
  #3 (permalink)  
Antiguo 05/08/2017, 09:11
david3716
 
Fecha de Ingreso: abril-2011
Ubicación: Colombia
Mensajes: 67
Antigüedad: 13 años
Puntos: 4
Respuesta: Mostrar datos de registro luego de guardar formulario

Cita:
Iniciado por xfxstudios Ver Mensaje
Código PHP:
Ver original
  1. if(!$registro)
  2. {
  3. echo"
  4. <script language='javascript'>
  5. alert('ERROR AL GUARDAR DATOS, PROBABLE CLAVE REPETIDA')
  6. window.location='index.html'
  7. </script>";
  8. exit();
  9. }
  10. else
  11. {
  12. echo"
  13. <script language='javascript'>
  14. alert('Registro exitoso ' ".$nombre." 'Presione OK para Continuar)
  15. window.location='index.html'
  16. </script>";
  17. }

Prueba así

por cierto cambia de Mysql a Mysqli porque la primera ya esta depreciada

Gracias amigo por tu ayuda, me funciono perfecto solo modifique las comillas sencillas y viola funciono a la perfeccion, gracias.

Y si tienes razon actualizo el codigo con mysqli

El codigo que me funciono es este ...

Código PHP:
if(!$registro

echo

<script language='javascript'> 
alert('ERROR AL GUARDAR DATOS, PROBABLE CLAVE REPETIDA') 
window.location='index.html' 
</script>"

exit(); 

else 

echo

<script language='javascript'> 
alert('Registro exitoso  "
.$nombre." Presione OK para Continuar') 
window.location='index.html' 
</script>"

}
?> 

Última edición por david3716; 05/08/2017 a las 09:13 Razón: Citar el codigo ok