Ver Mensaje Individual
  #3 (permalink)  
Antiguo 06/09/2010, 13:24
Avatar de ylellan
ylellan
 
Fecha de Ingreso: mayo-2010
Ubicación: en un lugar de Veracruz
Mensajes: 432
Antigüedad: 14 años
Puntos: 36
Respuesta: validaciones con un formulario en php

puedes hacerlo con javascript

algo similar

Código HTML:
Ver original
  1. function validar(formulario)
  2. {
  3. if(formulario.nombre.value='')
  4. {
  5. alert("Ingresa el nombre");
  6. formulario.nombre.focus();
  7. return false;
  8. }
  9. return true;
  10. }
  11. </head>
  12. <form method="post" action="otra.php" onsubmit="validar(this)">
  13. Nombre: <input type="text" name="nombre">
  14. <input type="submit" value="Enviar">
  15. </form>
  16. </body>
  17. </html>