| |||
Formulario por mail Hola a todos necesito enviar datos de un formulario por mail.. me podrian colaborar, y en que formato o en que distribucion llegarian los datos del formulario, gracias |
| ||||
Respuesta: Formulario por mail Simplemente le indicas que es AUTO_NUMERIC al crear el campo en tu definición de datos. Si tu tabla ya esta creada necesitas hacer un ALTER y agregar un INDEX en el campo con su respectivo AUTO NUMERIC. Saludos. |
| |||
Respuesta: Formulario por mail Hola me podrian ayudar... ya cuadre el formulario para enviar los datos pero ni me los envia y ni me sale error... que pasara... le adjunto el codigo del form: include ("conexion.php"); $link=conectarse(); $sql="select * from usuarios where cod_usu= '".$_GET['cod_usu']."'"; $registros = mysql_query($sql) or die ($error_sel); $row = mysql_fetch_array($registros); //$sql="select * from acceso where cod_usua='".$mod."'"; $result=mysql_query($sql,$link); ?> <?php if (!$HTTP_POST_VARS){ ?><form action="guardarsolicitud.php" method="post" name="form1" id="form1"> <p align="center"><img src="permisos.jpg" width="293" height="134" /></p> <p align="center"><strong><img src='citrix.jpg'width='40' height='30'/><img src='seven.jpeg'/><img src='kactus.jpg'width='35' height='30'/><img src='correo1.bmp'width='40' height='35'/><img src='sicope.jpg'width='45' height='38'/><img src='savvion.gif'width='60' height='35'/></strong></p> <? echo "<center><strong>Autoriza: ".$row['cod_usu']." -- ".$row['nom_usu']."</strong></center>"; ?> <table width="810" border="0" align="center"> <tr> <td colspan="2"><div align="right" class="Estilo10"><span class="Estilo4">No. Identificacion</span></div></td> <td colspan="3"><input name="identificacion" type="text" id="identificacion" onfocus="this.style.background='#ccffff'" onblur="this.style.background='#ffffff'" onkeypress= "if(event.keyCode==13){form1.onit.value=1;form1.oc odsuc.value=1;form1.btippag.value=1;form1.ubicanit .value=1;submit();} if(event.keyCode>=48 && event.keyCode<=58 ){} else{event.keyCode=8;}" size="15" maxlength="15"/> <input name="cod_usu" type="text" id="cod_usu" onfocus="this.style.background='#ccffff'" onblur="this.style.background='#ffffff'" onkeypress= "if(event.keyCode==13){form1.onit.value=1;form1.oc odsuc.value=1;form1.btippag.value=1;form1.ubicanit .value=1;submit();} if(event.keyCode>=48 && event.keyCode<=58 ){} else{event.keyCode=8;}" size="15" maxlength="15" value=<? echo $row['cod_usu']?>/></td> </tr> <tr> <td><span class="Estilo8">Nombres</span></td> <td><span class="Estilo8"> <input name="nombre" type="text" maxlength="40" size="40" onkeypress="if(event.keyCode==13){if(form1.identif icacion.value.trim()!=''){form1.segape.focus();} else{alert('Faltan datos por registrar'); form1.priape.value='';form1.priape.focus();} } if(event.keyCode>=65 && event.keyCode<=90 || event.keyCode>=97 && event.keyCode<=122 || event.keyCode==32 || event.keyCode==42 || event.keyCode==241 || event.keyCode==209){} else{event.keyCode=8;}" onfocus="this.style.background='#ccffff'" onblur="this.style.background='#ffffff'" /> </span></td> <td colspan="2"><span class="Estilo8">Apellidos</span></td> <td><span class="Estilo8"> <input name="apellido" type="text" maxlength="40" size="40" onkeypress="if(event.keyCode==13){if(form1.nombre. value.trim()!=''){form1.segape.focus();} else{alert('faltan datos por registrar'); form1.priape.value='';form1.priape.focus();} } if(event.keyCode>=65 && event.keyCode<=90 || event.keyCode>=97 && event.keyCode<=122 || event.keyCode==32 || event.keyCode==42 || event.keyCode==241 || event.keyCode==209){} else{event.keyCode=8;}" onfocus="this.style.background='#ccffff'" onblur="this.style.background='#ffffff'" /> </span></td> </tr> <tr> <td width="67"><span class="Estilo8">Cargo</span></td> <td width="298"><input name="cargo" type="text" onfocus="this.style.background='#ccffff'" onblur="this.style.background='#ffffff'" onkeypress="if(event.keyCode==13){if(form1.apellid o.value.trim()!=''){form1.segape.focus();} else{alert('Faltan datos por registrar'); form1.priape.value='';form1.priape.focus();} } if(event.keyCode>=65 && event.keyCode<=90 || event.keyCode>=97 && event.keyCode<=122 || event.keyCode==32 || event.keyCode==42 || event.keyCode==241 || event.keyCode==209){} else{event.keyCode=8;}" size="30" maxlength="80" /></td> <td colspan="2"><span class="Estilo8">Contrato</span></td> <td width="325"><input name="contrato" type="text" onfocus="this.style.background='#ccffff'" onblur="this.style.background='#ffffff'" onkeypress="if(event.keyCode==13){if(form1.cargo.v alue.trim()!=''){form1.segape.focus();} else{alert('Faltan datos por registrar'); form1.priape.value='';form1.priape.focus();} } if(event.keyCode>=65 && event.keyCode<=90 || event.keyCode>=97 && event.keyCode<=122 || event.keyCode==32 || event.keyCode==42 || event.keyCode==241 || event.keyCode==209){} else{event.keyCode=8;}" size="30" maxlength="80" /></td> </tr> <tr bgcolor="#6699FF"> <td height="40" bgcolor="#006699"><p align="center" class="Estilo7">Citrix <input name="citrix" type="checkbox" value="citrix" /> </p></td> <td bgcolor="#006699"><span class="Estilo8"><span class="Estilo6">Observacion</span><span class="Estilo1"> <textarea name="obscitrix" cols="30" onfocus="this.style.background='#ccffff'" onblur="this.style.background='#ffffff'"></textarea> </span></span></td> <td colspan="2" bgcolor="#006699"><p align="left" class="Estilo7">Seven <input name="seven" type="checkbox" value="seven" /> </p></td> <td bgcolor="#006699"><span class="Estilo8"><span class="Estilo6">Observacion</span><span class="Estilo1"> <textarea name="obsseven" cols="30" onfocus="this.style.background='#ccffff'" onblur="this.style.background='#ffffff'"></textarea> </span></span></td> </tr> <tr bgcolor="#6699FF"> <td height="43" bgcolor="#006699"><p align="center" class="Estilo7">Kactus <input name="kactus" type="checkbox" value="kactus" /> </p></td> <td bgcolor="#006699"><span class="Estilo8"><span class="Estilo6">Observacion</span><span class="Estilo1"> <textarea name="obskactus" cols="30" onfocus="this.style.background='#ccffff'" onblur="this.style.background='#ffffff'"></textarea> </span></span></td> <td colspan="2" bgcolor="#006699"><p align="left" class="Estilo7">E-Mail <input name="email" type="checkbox" value="email" /> </p></td> <td bgcolor="#006699"><span class="Estilo8"><span class="Estilo6">Observacion</span><span class="Estilo1"> <textarea name="obsemail" cols="30" onfocus="this.style.background='#ccffff'" onblur="this.style.background='#ffffff'"></textarea> </span></span></td> </tr> <tr bgcolor="#6699FF"> <td height="50" bgcolor="#006699"><p align="center" class="Estilo7">Sicope <input name="sicope" type="checkbox" value="sicope" /> </p></td> <td bgcolor="#006699"><p class="Estilo8"><span class="Estilo6">Observacion</span><span class="Estilo1"> <textarea name="obssicope" cols="30" onfocus="this.style.background='#ccffff'" onblur="this.style.background='#ffffff'"></textarea> </span></p></td> <td colspan="2" bgcolor="#006699"><p align="left" class="Estilo7">Savvion <input name="savvion" type="checkbox" value="savvion" /> </p></td> <td bgcolor="#006699"><p class="Estilo8"><span class="Estilo6">Observacion</span><span class="Estilo1"> <textarea name="obssavvion" cols="30" onfocus="this.style.background='#ccffff'" onblur="this.style.background='#ffffff'"></textarea> </span></p></td> </tr> </table> <table width="79" border="0" align="center"> <tr> <td width="73"><div align="center"> <input type="submit" name="boton" value="Enviar" /> </div></td> </tr> </table> <label></label> <div align="center"> <p><img src="image002.gif" width="119" height="40" /></p> </div> </form> <? }else{ //Estoy recibiendo el formulario, compongo el cuerpo $cuerpo = "Formulario enviado\n"; $cuerpo .= "Identificación: " . $HTTP_POST_VARS["identificacion"] . "\n"; $cuerpo .= "Nombres: " . $HTTP_POST_VARS["nombre"] . "\n"; $cuerpo .= "Apellidos: " . $HTTP_POST_VARS["apellido"] . "\n"; $cuerpo .= "Cargo: " . $HTTP_POST_VARS["cargo"] . "\n"; $cuerpo .= "Contrato: " . $HTTP_POST_VARS["contrato"] . "\n"; $cuerpo .= "Citrix: " . $HTTP_POST_VARS["citrix"] . "\n"; $cuerpo .= "Observaciones: " . $HTTP_POST_VARS["obscitrix"] . "\n"; $cuerpo .= "Seven: " . $HTTP_POST_VARS["seven"] . "\n"; $cuerpo .= "Observaciones: " . $HTTP_POST_VARS["obsseven"] . "\n"; $cuerpo .= "Kactus: " . $HTTP_POST_VARS["kactus"] . "\n"; $cuerpo .= "Observaciones: " . $HTTP_POST_VARS["obskactus"] . "\n"; $cuerpo .= "Email: " . $HTTP_POST_VARS["email"] . "\n"; $cuerpo .= "Observaciones: " . $HTTP_POST_VARS["obsemail"] . "\n"; $cuerpo .= "Sicope: " . $HTTP_POST_VARS["sicope"] . "\n"; $cuerpo .= "Observaciones: " . $HTTP_POST_VARS["obssicope"] . "\n"; $cuerpo .= "Savvion: " . $HTTP_POST_VARS["savvion"] . "\n"; $cuerpo .= "Observaciones: " . $HTTP_POST_VARS["obssavvion"] . "\n"; //mando el correo... mail("[email protected]","Formulario recibido",$cuerpo); //doy las gracias por el envío echo "Gracias por rellenar el formulario. Se ha enviado correctamente."; } ?> </body> </html> de todas maneras me guarda el registro pero no me lo envia por mail Última edición por ingluis; 01/06/2009 a las 15:25 |