<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1034225" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1034225</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/send-friend-php#comment-1198692</link>
    <description> &lt;p&gt;Is the above code in sendtofriend.html ? if so, is .html phased to php (via htaccess)&lt;br /&gt;
If thats ok can you show us the  tag please.&lt;br /&gt;
Withouit the whole code, bits like $visitorNamernEmail: $visitorEmailrnComments:rn$comments might make sense, it doesn&#039;t look right but it could be. is :rn meant to be a new line? new line is \n\r&lt;/p&gt;
&lt;p&gt;The above code looks like it will work, but ideally everything from the form needs to be $_POST[&#039;variablename&#039;] and the &amp;lt;= does not catch aa or just a in all fields.&lt;br /&gt;
$visitorName should be checked to minimum value of 2 or 3 (some Asian names can be short), $visitorEmail should be checked it is an email, contain letters and or numbers then a @ then minimum 2 then a . then minimum 3 or 2 and . and 2&lt;br /&gt;
for emails I personally check for 3 things:&lt;br /&gt;
 	$_POST[&#039;email&#039;] = trim($_POST[&#039;email&#039;]);&lt;br /&gt;
if(strlen($_POST[&#039;email&#039;])&amp;lt;5)&lt;br /&gt;
if(empty($_POST[&#039;email&#039;]))&lt;br /&gt;
if(!eregi(&quot;^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+([\.][a-z0-9-]+)+$&quot;,$_POST[&#039;email&#039;]))&lt;/p&gt;
&lt;p&gt;The comments at minimum should check there is no code being submitted, remove html tags or convert them to ascii&lt;br /&gt;
strip_tags($thereinput)&lt;br /&gt;
htmlspecialchars($thereinput);&lt;br /&gt;
htmlentities($thereinput, ENT_QUOTES);&lt;br /&gt;
strtr($thereinput, array(&#039;(&#039; =&amp;gt; &#039;&amp;#40;&#039;, &#039;)&#039; =&amp;gt; &#039;&amp;#41;&#039;));&lt;br /&gt;
addslashes($thereinput);&lt;br /&gt;
ereg_replace(&quot;%&quot;,&quot;\\%&quot;,$thereinput);&lt;/p&gt;
&lt;p&gt;are a few methods, each doing different things&lt;/p&gt;
&lt;p&gt;The $sendto should also check that it is just one email address (just check there is only one @), this can stop BBC injections - your form being used by spam bots.&lt;br /&gt;
Depends how far you want to go, you could also check the form has been sent from your domain (cuts out spam bot usage)&lt;/p&gt;
 </description>
     <pubDate>Tue, 02 May 2006 08:36:45 +0000</pubDate>
 <dc:creator>Busy</dc:creator>
 <guid isPermaLink="false">comment 1198692 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
