Ver Mensaje Individual
  #13 (permalink)  
Antiguo 23/06/2004, 19:24
edudw
 
Fecha de Ingreso: abril-2004
Mensajes: 634
Antigüedad: 20 años, 1 mes
Puntos: 2
Bueno, como les dije aqui les explico mas o menos como lo hago yo para solucionar esto, tratare de ser claro (OJO, no se mucho de php)

AQUI ESTA EL CODIGO

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Documento sin t&iacute;tulo</title>
<link href="../../nip.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-color: #999999;
}
-->
</style></head>

<body>
<?
if (!$HTTP_POST_VARS){
?>
<form action="form_comercio.php" method=post>
<table width="300" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="300" height="24" valign="top" bgcolor="#999999"><!--DWLayoutEmptyCell-->&nbsp;</td>
</tr>
<tr>
<td height="1" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="300" height="1"></td>
</tr>
</table></td>
</tr>
<tr>
<td height="380" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="bg_down_box2">
<!--DWLayoutTable-->
<tr>
<td width="140" height="22" valign="top">Nombre * </td>
<td width="160" valign="top"><input name="name" type="text" id="name" size="24"></td>
</tr>
<tr>
<td height="22" valign="top">Mail</td>
<td valign="top"><input name="mail" type="text" id="mail" size="24"></td>
</tr>
<tr>
<td height="22" valign="top">Nombre Negocio*</td>
<td valign="top"><input name="negocio" type="text" id="negocio" size="24"></td>
</tr>
<tr>
<td height="24" valign="top">Rubro*</td>
<td valign="top"><select name="rubro" id="rubro">
<option value="Minimarket">Minimarket</option>
<option value="Panaderia">Panaderia</option>
<option value="Peluqueria">Peluqueria</option>
<option value="Carniceria">Carniceria</option>
<option value="Libreria">Libreria</option>
<option value="Buses - Taxis">Buses - Taxis</option>
</select></td>
</tr>
<tr>
<td height="22" valign="top">Telefono</td>
<td valign="top"><input name="fono" type="text" id="fono"></td>
</tr>
<tr>
<td height="70" valign="top">Direccion Negocio * </td>
<td valign="top"><textarea name="direccion" cols="20" wrap="VIRTUAL" id="direccion">ej: Nicasio Alarcon 33445 </textarea></td>
</tr>
<tr>
<td rowspan="2" valign="top">Horarios</td>
<td height="70" valign="top"><textarea name="horarios" cols="20" rows="3" wrap="VIRTUAL" id="horarios">ej: lunes a domingo, todo horario, etc</textarea></td>
</tr>
<tr>
<td height="1"></td>
</tr>
<tr>
<td rowspan="2" valign="top">Otros Detalles <br>
(algun otro dato que considere importante) </td>
<td height="70" valign="top"><textarea name="detalles" cols="20" rows="3" wrap="VIRTUAL" id="detalles"></textarea></td>
</tr>
<tr>
<td height="1"></td>
</tr>
<tr>
<td rowspan="2" valign="top"><input type="reset" name="Submit" value="Borrar todo"> </td>
<td height="24" valign="top"><input type="submit" name="Submit" value="Enviar"></td>
</tr>
<tr>
<td height="1"></td>
</tr>
<tr align="center">
<td height="31" colspan="2" valign="top" bgcolor="#999999">Los campos marcados con * son obligatorios.<br>
ESTE SERVICIO ES GRATIS</td>
</tr>
</table></td>
</tr>
</table>
</form>
<?
}else{
//Estoy recibiendo el formulario, compongo el cuerpo
$cuerpo = "Formulario enviado\n";
$cuerpo .= "Nombre: " . $HTTP_POST_VARS["name"] . "\n";
$cuerpo .= "Email: " . $HTTP_POST_VARS["mail"] . "\n";
$cuerpo .= "Nombre del negocio: " . $HTTP_POST_VARS["negocio"] . "\n";
$cuerpo .= "Rubro del negocio: " . $HTTP_POST_VARS["rubro"] . "\n";
$cuerpo .= "El Telefono del negocio es: " . $HTTP_POST_VARS["fono"] . "\n";
$cuerpo .= "La direccion del Negocio es: " . $HTTP_POST_VARS["direccion"] . "\n";
$cuerpo .= "Otros datos del negocio son: " . $HTTP_POST_VARS["detalles"] . "\n";

//mando el correo...
mail("[email protected]","Formulario recibido",$cuerpo);

//doy las gracias por el envío
echo "Su informacion ha sido recibida, sus datos apareceran en nuestro sitio dentro de 48 horas.";
}
?>

</body>
</html>


BUENO, abran este codigo en el dreamweaver para modificarlo a su gusto. Este formulario lo hice para resibir los datos de un pequeño pueblo.

Ojala les sirva. No olviden cambiar la direccion de correo en esta linea de codigo:

//mando el correo...
mail("[email protected]","Formulario recibido",$cuerpo);

bye