Hola Gente! :D
no encontre en el foro de como hacer que en un campo(EJ:Telefono)
solo se pongan numeros con funcion php sin letras ni simbolos ni vacio
en conclusion tngo esto:
Código PHP:
<html>
<body>
<br><center>Formulario(Envío de MP)</center></br>
<form action="insertar-registro.php" method="POST">
Mensaje:<textarea name="mensaje" cols="30" rows="3"></textarea><p>
Selección: <input name="col" type="radio" value="si"/> si
<input name="col" type="radio" value="no" checked/> no
<input name="col" type="radio" value="nose"/> nose <p>
Opción: <input type="checkbox" name="opc" value="ok"/>OK</input>
<input type="checkbox" name="opc" value="nada" checked/>Nada</input> <p>
Teléfono: <input type="text" name="telefono">Acuérdate de usar solo números<p>
E-Mail: <input type="text" name="email"><p>
<input name="enviar" type="submit" value="enviar">
<input type="reset" name="limpiar">
</form>
</body>
</html>
Código PHP:
<?php
include"conexion.php";
$col = $_POST['col'];
$opc = $_POST['opc'];
mysql_query("insert into clientesl2(mensaje,seleccion, opcion, telefono, email) values ('{$_REQUEST['mensaje']}','$col','$opc','{$_REQUEST['telefono']}','{$_REQUEST['email']}')");
?>
<html>
<body>
<b><hl><center><a href="index.html"><button>indice</button></a></center></hl></b><br>
</body>
</html>
Tengo q hacer en total q ni la parte de seleccion ni telefono este vacia, y tambien q el campo telefono solo acepte numeros
Gracias por cualquier ayuda y orientacion