Ayuda para enviar un formulario por correo php
Publicado por javier (2 intervenciones) el 26/04/2010 13:31:47
Buenas quisiera que me ayudaraís para enviar el siguiente formulario html por php:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>
<body>
<p>Rellene el siguiente formulario para realizar la solicitud de inscripción en el curso seleccionado y pulse el botón "Enviar datos".</p>
<form name="frm" action="" method="POST" >
<input type="hidden" name="agregar" value="1" />
<fieldset >
<legend>Solicitud de inscripción en el curso seleccionado</legend>
<p><strong>(*) Datos Obligatorios</strong></p>
<ul>
<li>
<label for="nombre">Nombre*:</label>
<input type="text" name="nombre" id="nombre" size="30" value=" " onblur="validanombre();"/></li><li>
<label for="apellidos">Apellidos*:</label>
<input type="text" name="apellidos" id="apellidos" size="30" value=" "/></li><li>
<label for="direccion">Dirección:</label>
<input type="text" name="direccion" id="direccion" size="30" value=" "/></li><li>
<label for="cp">CP:</label>
<input type="text" name="cp" id="cp" size="5" value=" " /></li><li>
<label for="ciudad">Ciudad:</label>
<input type="text" name="ciudad" id="ciudad" size="30" value=" "/></li><li><label for="provincia">Provincia:</label>
<input type="text" name="provincia" id="provincia" size="30" value=" "/></li><li><label for="telefono">Teléfono*:</label>
<input type="text" name="telefono" id="telefono" size="30" value=" "/></li><li><label for="email">E-mail*:</label>
<input type="text" name="email" id="email" size="30" value=" "/></li><li><label for="empresa">Empresa:</label>
<input type="text" name="empresa" id="empresa" size="30" value=" "/></li><li><label for="localidad">Localidad de impartición:</label>
<input type="text" name="localidad" id="localidad" size="30" value=" "/></li></ul>
<p><input type="submit" name="enviar" value="Enviar Datos" />
<input name="action" type="hidden" value="send">
<input type="reset" value="Borrar Datos" /></p>
</fieldset>
</form>
</body>
</html>
se que en action debo poner el documento php para recoger y enviar los campos por correo...pues he probado de todo y nada...
a ver si me podeís indicar la sintaxis del php para enviar el contenido de los campos del formulario.
gracias
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>
<body>
<p>Rellene el siguiente formulario para realizar la solicitud de inscripción en el curso seleccionado y pulse el botón "Enviar datos".</p>
<form name="frm" action="" method="POST" >
<input type="hidden" name="agregar" value="1" />
<fieldset >
<legend>Solicitud de inscripción en el curso seleccionado</legend>
<p><strong>(*) Datos Obligatorios</strong></p>
<ul>
<li>
<label for="nombre">Nombre*:</label>
<input type="text" name="nombre" id="nombre" size="30" value=" " onblur="validanombre();"/></li><li>
<label for="apellidos">Apellidos*:</label>
<input type="text" name="apellidos" id="apellidos" size="30" value=" "/></li><li>
<label for="direccion">Dirección:</label>
<input type="text" name="direccion" id="direccion" size="30" value=" "/></li><li>
<label for="cp">CP:</label>
<input type="text" name="cp" id="cp" size="5" value=" " /></li><li>
<label for="ciudad">Ciudad:</label>
<input type="text" name="ciudad" id="ciudad" size="30" value=" "/></li><li><label for="provincia">Provincia:</label>
<input type="text" name="provincia" id="provincia" size="30" value=" "/></li><li><label for="telefono">Teléfono*:</label>
<input type="text" name="telefono" id="telefono" size="30" value=" "/></li><li><label for="email">E-mail*:</label>
<input type="text" name="email" id="email" size="30" value=" "/></li><li><label for="empresa">Empresa:</label>
<input type="text" name="empresa" id="empresa" size="30" value=" "/></li><li><label for="localidad">Localidad de impartición:</label>
<input type="text" name="localidad" id="localidad" size="30" value=" "/></li></ul>
<p><input type="submit" name="enviar" value="Enviar Datos" />
<input name="action" type="hidden" value="send">
<input type="reset" value="Borrar Datos" /></p>
</fieldset>
</form>
</body>
</html>
se que en action debo poner el documento php para recoger y enviar los campos por correo...pues he probado de todo y nada...
a ver si me podeís indicar la sintaxis del php para enviar el contenido de los campos del formulario.
gracias
Valora esta pregunta


0