Estoy haciendo una sección para intercambio de links en una web. Los interesados pueden copiar el código que coloqué en un textarea para agregarlo en sus propias webs.
Ahora bien, tengo un formulario que recoge la información del interesado en intercambiar links. Este formulario tiene los campos Nombre, Url donde colocó el link hacia nuestro sitio, Email para contactarlo y por último un textarea que debe recoger el código del link recíproco que nosotros pondremos en nuestro sitio.
El problema es que no logro hacer que me llegue todo el código. Le dado la vuelta a todo el FAQ y no le encuentro salida. Tal vez es algo muy sencillo, pero ya no doy una....
Este es el código de mi formulario:
Código:
Aquí reviso y envío el formulario:<form name="form1" method="post" action="links.php"> <table width="95%" align="center"> <tr> <td width="54%"><p align="right"><b>Nombre: </b></p></td> <td width="46%" align="left"><input name="nombre" type="text" id="nombre" size="30" maxlength="80"></td> </tr> <tr> <td><p align="right"><b>Email: </b></p></td> <td align="left"><input name="email" type="text" id="email" size="30" maxlength="80"></td> </tr> <tr> <td><div align="right"><strong>URL donde colocó nuestro link: </strong></div></td> <td align="left"><input name="url" type="text" id="url" size="30" maxlength="80"></td> </tr> <tr> <td valign="top"><p align="right"><b>Código de su Enlace: </b></p></td> <td align="left"><textarea name="enlace" cols="30" rows="4" id="enlace"></textarea></td> </tr> <tr> <td height="26"> </td> <td align="left"><input name="submit" type="submit" onClick="MM_validateForm('nombre','','R','email','','RisEmail','url','','R','enlace','','R');return document.MM_returnValue" value="Enviar"></td> </tr> </table> <input type="hidden" name="isOK" value="OK"> <input name="$REMOTE_ADDR" type="hidden" id="$REMOTE_ADDR" value="$REMOTE_ADDR"> <input name="$HTTP_USER_AGENT" type="hidden" id="$HTTP_USER_AGENT" value="$HTTP_USER_AGENT"> </form>
Código:
y esto es lo que recibo por correo:<? if (isset($_POST['isOK'])) { function checkString($s) { $s = str_replace("<","<",$s); $s = str_replace("'","''",$s); $s = str_replace(chr(13),"<br>",$s); return $s; } $nombre=checkString($_POST['nombre']); $url=checkString($_POST['url']); $email=checkString($_POST['email']); $enlace=checkString($_POST['enlace']); $to= "[email protected]"; $subject= "Intercambio de Links"; $messageSend= "<b>Nombre:</b> ".$nombre." <br>"; $messageSend.= "<b>URL:</b> ".$url." <br>"; $messageSend.= "<b>Email:</b> ".$email." <br>"; $messageSend.= "<b>Enlace:</b> ".$enlace." <br>"; $messageSend.= "<b>IP: </b>".$REMOTE_ADDR."\r\n<br>"; $messageSend.= "<b>Browser: </b>".$HTTP_USER_AGENT."\r\n<br>"; $headers = "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=utf-8\r\n"; $headers .= "From: NNNN <[email protected]>\r\n"; $headers .= "Reply-To: ".$email."\r\n"; //mail($to, $subject, $messageSend); mail($to, $subject, $messageSend, $headers); ?>
Código:
Sé que no debo usar function checkString($s), pero si lo quito, entonces me llega el enlace formateado y así no me sirve... Nombre: Yo Solito URL: http://dominio.net/links.html Email: [email protected] Enlace: <p align=\"center\"><a href=\"http://www.domino.com\" target=\"_blank\"><img src=\"http://www.dominio.com/images/bannerex.gif\" alt=\"Blah Blah Blah!\" name=\"Blah\" width=\"468\" height=\"60\" border=\"0\" id=\"blah\" /><br />Blah Blah Blah.</a> IP: 192.168.1.3 Browser: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; GTB5; InfoPath.2)
![Neurótico](http://static.forosdelweb.com/fdwtheme/images/smilies/scared.png)
![Neurótico](http://static.forosdelweb.com/fdwtheme/images/smilies/scared.png)
![Neurótico](http://static.forosdelweb.com/fdwtheme/images/smilies/scared.png)
¿Cómo le hago para que me llegue así?:
Código:
De antemano muy agradecido por su gran ayuda. <p align="center"><a href="http://www.dominio.com" target="_blank"><img src="http://www.dominio.com/images/bannerex.gif" alt="Blah Blah Blah!" name="Blah" width="468" height="60" border="0" id="blah" /><br />Blah Blah Blah!"</a>