<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[PunBB Forums — Error message]]></title>
		<link>https://punbb.informer.com/forums/topic/15825/error-message/</link>
		<atom:link href="https://punbb.informer.com/forums/feed/rss/topic/15825/" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Error message.]]></description>
		<lastBuildDate>Sun, 06 May 2007 22:32:30 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Error message]]></title>
			<link>https://punbb.informer.com/forums/post/93693/#p93693</link>
			<description><![CDATA[<p>No doesn&#039;t work , same problem <img src="https://punbb.informer.com/forums/img/smilies/hmm.png" width="15" height="15" alt="hmm" /></p>]]></description>
			<author><![CDATA[null@example.com (glucarelli)]]></author>
			<pubDate>Sun, 06 May 2007 22:32:30 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/93693/#p93693</guid>
		</item>
		<item>
			<title><![CDATA[Re: Error message]]></title>
			<link>https://punbb.informer.com/forums/post/93690/#p93690</link>
			<description><![CDATA[<p>Well, then it&#039;s not due to the closing brace <img src="https://punbb.informer.com/forums/img/smilies/wink.png" width="15" height="15" alt="wink" /><br /></p><div class="codebox"><pre><code>&lt;?php
define(&#039;PUN_ROOT&#039;, &#039;./&#039;);
define(&#039;PUN_QUIET_VISIT&#039;, 1);
require PUN_ROOT.&#039;include/common.php&#039;;
$page_title = pun_htmlspecialchars($pun_config[&#039;o_board_title&#039;]) . &#039; / Contact&#039;;        //Set the page title here
define(&#039;PUN_ALLOW_INDEX&#039;, 1);
require PUN_ROOT.&#039;header.php&#039;;
require PUN_ROOT.&#039;include/parser.php&#039;;
//echo &quot;&lt;PRE&gt;&quot;; print_r ($pun_config); echo &quot;&lt;/PRE&gt;&quot;;

if ($_POST[&#039;form_sent&#039;] == 1)
{
//Process The Form
?&gt;

&lt;?php
$as = $_POST[&#039;antispam&#039;];
$as2 = $_POST[&#039;spamvalidator&#039;];
 if ($as != $as2){
?&gt;
&lt;div class=&quot;blockform&quot;&gt;
    &lt;h2&gt;&lt;span&gt;Contact &lt;?php echo $pun_config[&#039;o_board_title&#039;]; ?&gt;&lt;/span&gt;&lt;/h2&gt;
    &lt;div class=&quot;box&quot;&gt;
        &lt;form id=&quot;contact&quot; method=&quot;post&quot; action=&quot;contact.php&quot;&gt;
            &lt;div class=&quot;inform&quot;&gt;
                &lt;fieldset&gt;
                    &lt;legend&gt;Email not sent&lt;/legend&gt;
                    &lt;div class=&quot;infldset&quot;&gt;
                        &lt;b&gt;Your mail could not be sent!&lt;/b&gt; The antispamcode you entered did not match.
                    &lt;/div&gt;
                &lt;/fieldset&gt;
            &lt;/div&gt;
        &lt;/form&gt;
    &lt;/div&gt;
&lt;/div&gt;
&lt;?php
      }
      else
      {
    $recipient = &quot;$toName &lt;&quot;.$toMail.&quot;&gt;&quot;;
    $headers =&quot;From: &quot;.$_POST[&#039;name&#039;].&quot; &lt;&quot;.$_POST[&#039;email&#039;].&quot;&gt;&quot;;
    $subject = &quot;WEBFORM:&quot;.$_POST[&#039;subject&#039;];
    $message = str_replace(&quot;\\&quot;, &quot;&quot;, $_POST[&#039;comments&#039;]);
    mail($pun_config[&#039;o_admin_email&#039;], $subject, $message, $headers);
?&gt;


&lt;div class=&quot;blockform&quot;&gt;
    &lt;h2&gt;&lt;span&gt;Contact &lt;?php echo $pun_config[&#039;o_board_title&#039;]; ?&gt;&lt;/span&gt;&lt;/h2&gt;
    &lt;div class=&quot;box&quot;&gt;
        &lt;form id=&quot;contact&quot; method=&quot;post&quot; action=&quot;contact.php&quot;&gt;
            &lt;div class=&quot;inform&quot;&gt;
                &lt;fieldset&gt;
                    &lt;legend&gt;Email Sent&lt;/legend&gt;
                    &lt;div class=&quot;infldset&quot;&gt;
                        &lt;b&gt;Thank you for contacting us!&lt;/b&gt; The following information was sent to &lt;?php echo $pun_config[&#039;o_board_title&#039;]; ?&gt;.&lt;br /&gt;&lt;br /&gt;
                        &lt;label&gt;Name:&lt;br /&gt;&lt;?php echo $_POST[&#039;name&#039;]; ?&gt;&lt;br /&gt;&lt;/label&gt;
                        &lt;label&gt;Email:&lt;br /&gt;&lt;?php echo $_POST[&#039;email&#039;]; ?&gt;&lt;br /&gt;&lt;/label&gt;
                        &lt;label&gt;Subject:&lt;br /&gt;&lt;?php echo $_POST[&#039;subject&#039;]; ?&gt;&lt;br /&gt;&lt;/label&gt;
                        &lt;label&gt;Comments:&lt;br /&gt;&lt;?php echo $_POST[&#039;comments&#039;]; ?&gt;&lt;br /&gt;&lt;/label&gt;
                    &lt;/div&gt;
                &lt;/fieldset&gt;
            &lt;/div&gt;
        &lt;/form&gt;
    &lt;/div&gt;
&lt;/div&gt;

&lt;?php }
}
else
{ 
//Display the Form
$antispam = dechex(rand(hexdec(000000), hexdec(FFFFFF)));
?&gt;
&lt;script language=&quot;JavaScript&quot; type=&quot;text/JavaScript&quot;&gt;
&lt;!--
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf(&quot;?&quot;))&gt;0&amp;&amp;parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&amp;&amp;d.all) x=d.all[n]; for (i=0;!x&amp;&amp;i&lt;d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&amp;&amp;d.layers&amp;&amp;i&lt;d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x &amp;&amp; d.getElementById) x=d.getElementById(n); return x;
}

function MM_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors=&#039;&#039;,args=MM_validateForm.arguments;
  for (i=0; i&lt;(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!=&quot;&quot;) {
      if (test.indexOf(&#039;isEmail&#039;)!=-1) { p=val.indexOf(&#039;@&#039;);
        if (p&lt;1 || p==(val.length-1)) errors+=&#039;- &#039;+nm+&#039; must be an e-mail address.\n&#039;;
      } else if (test!=&#039;R&#039;) { num = parseFloat(val);
        if (isNaN(val)) errors+=&#039;- &#039;+nm+&#039; must be a number.\n&#039;;
        if (test.indexOf(&#039;inRange&#039;) != -1) { p=test.indexOf(&#039;:&#039;);
          min=test.substring(8,p); max=test.substring(p+1);
          if (num&lt;min || max&lt;num) errors+=&#039;- &#039;+nm+&#039; must be a number between &#039;+min+&#039; and &#039;+max+&#039;.\n&#039;;
    } } } else if (test.charAt(0) == &#039;R&#039;) errors += &#039;- &#039;+nm+&#039; is required.\n&#039;; }
  } if (errors) alert(&#039;The following errors occurred:\n&#039;+errors);
  document.MM_returnValue = (errors == &#039;&#039;);
}
//--&gt;
&lt;/script&gt;
&lt;div class=&quot;blockform&quot;&gt;
    &lt;h2&gt;&lt;span&gt;Contact &lt;?php echo $pun_config[&#039;o_board_title&#039;]; ?&gt;&lt;/span&gt;&lt;/h2&gt;
    &lt;div class=&quot;box&quot;&gt;
        &lt;form id=&quot;contact&quot; method=&quot;post&quot; action=&quot;contact.php&quot;&gt;
            &lt;div class=&quot;inform&quot;&gt;
                &lt;fieldset&gt;
                    &lt;legend&gt;Enter your contact details&lt;/legend&gt;
                    &lt;div class=&quot;infldset&quot;&gt;
                        Please enter your contact information and comments here. If you would like to share your comments with everyone, consider posting them on the &lt;a href=&quot;forum.php&quot;&gt;forum&lt;/a&gt; instead!&lt;br /&gt;
                        &lt;input type=&quot;hidden&quot; name=&quot;form_sent&quot; value=&quot;1&quot; /&gt;&lt;br /&gt;
                        &lt;label&gt;Name&lt;br /&gt;&lt;input type=&quot;text&quot; name=&quot;name&quot; value=&quot;&quot; size=&quot;40&quot; maxlength=&quot;40&quot; /&gt;&lt;br /&gt;&lt;/label&gt;
                        &lt;label&gt;Email&lt;br /&gt;&lt;input type=&quot;text&quot; name=&quot;email&quot; value=&quot;&quot; size=&quot;40&quot; maxlength=&quot;50&quot; /&gt;&lt;br /&gt;&lt;/label&gt;
                        &lt;label&gt;Subject&lt;br /&gt;&lt;input type=&quot;text&quot; name=&quot;subject&quot; value=&quot;&quot; size=&quot;40&quot; maxlength=&quot;50&quot; /&gt;&lt;br /&gt;&lt;/label&gt;
                        &lt;label&gt;Comments&lt;br /&gt;&lt;textarea name=&quot;comments&quot; rows=&quot;5&quot; cols=&quot;40&quot;&gt;&lt;/textarea&gt;&lt;br /&gt;&lt;/label&gt;
                        &lt;label&gt;No spam:&lt;br /&gt;&lt;input name=&quot;antispam&quot; type=&quot;text&quot; class=&quot;tekst&quot; size=&quot;6&quot;&gt; &lt;?php echo $antispam; ?&gt; &lt;input type=&quot;hidden&quot; value=&quot;&lt;?php echo $antispam; ?&gt;&quot; name=&quot;spamvalidator&quot; /&gt;&lt;/label&gt;
                    &lt;/div&gt;
                &lt;/fieldset&gt;
            &lt;/div&gt;
            &lt;p&gt;&lt;input type=&quot;submit&quot; name=&quot;update&quot; value=&quot;Submit&quot;  onClick=&quot;MM_validateForm(&#039;name&#039;,&#039;&#039;,&#039;R&#039;,&#039;email&#039;,&#039;&#039;,&#039;RisEmail&#039;,&#039;subject&#039;,&#039;&#039;,&#039;R&#039;);return document.MM_returnValue&quot; /&gt;&lt;/p&gt;
        &lt;/form&gt;
    &lt;/div&gt;
&lt;/div&gt;



&lt;?php

}    //close if statement
 
require PUN_ROOT.&#039;footer.php&#039;;</code></pre></div><p>See if that works</p>]]></description>
			<author><![CDATA[null@example.com (Smartys)]]></author>
			<pubDate>Sun, 06 May 2007 22:23:02 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/93690/#p93690</guid>
		</item>
		<item>
			<title><![CDATA[Re: Error message]]></title>
			<link>https://punbb.informer.com/forums/post/93689/#p93689</link>
			<description><![CDATA[<p>Thank you Smartys,but same results no confirmation or error message.</p>]]></description>
			<author><![CDATA[null@example.com (glucarelli)]]></author>
			<pubDate>Sun, 06 May 2007 22:10:56 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/93689/#p93689</guid>
		</item>
		<item>
			<title><![CDATA[Re: Error message]]></title>
			<link>https://punbb.informer.com/forums/post/93687/#p93687</link>
			<description><![CDATA[<div class="codebox"><pre><code>&lt;?php
define(&#039;PUN_ROOT&#039;, &#039;./&#039;);
define(&#039;PUN_QUIET_VISIT&#039;, 1);
require PUN_ROOT.&#039;include/common.php&#039;;
$page_title = pun_htmlspecialchars($pun_config[&#039;o_board_title&#039;]) . &#039; / Contact&#039;;        //Set the page title here
define(&#039;PUN_ALLOW_INDEX&#039;, 1);
require PUN_ROOT.&#039;header.php&#039;;
require PUN_ROOT.&#039;include/parser.php&#039;;
//echo &quot;&lt;PRE&gt;&quot;; print_r ($pun_config); echo &quot;&lt;/PRE&gt;&quot;;

if ($_POST[form_sent] == 1)
{
//Process The Form
?&gt;

&lt;?php
    $as = $_POST[&#039;antispam&#039;];
$as2 = $_POST[&#039;spamvalidator&#039;];
 if ($as != $as2){
?&gt;
&lt;div class=&quot;blockform&quot;&gt;
    &lt;h2&gt;&lt;span&gt;Contact &lt;?php echo $pun_config[&#039;o_board_title&#039;]; ?&gt;&lt;/span&gt;&lt;/h2&gt;
    &lt;div class=&quot;box&quot;&gt;
        &lt;form id=&quot;contact&quot; method=&quot;post&quot; action=&quot;contact.php&quot;&gt;
            &lt;div class=&quot;inform&quot;&gt;
                &lt;fieldset&gt;
                    &lt;legend&gt;Email not sent&lt;/legend&gt;
                    &lt;div class=&quot;infldset&quot;&gt;
                        &lt;b&gt;Your mail could not be sent!&lt;/b&gt; The antispamcode you entered did not match.
                    &lt;/div&gt;
                &lt;/fieldset&gt;
            &lt;/div&gt;
        &lt;/form&gt;
    &lt;/div&gt;
&lt;/div&gt;
&lt;?php
      }elseif($as == $as2){
    $recipient = &quot;$toName &lt;&quot;.$toMail.&quot;&gt;&quot;;
    $headers =&quot;From: &quot;.$_POST[name].&quot; &lt;&quot;.$_POST[email].&quot;&gt;&quot;;
    $subject = &quot;WEBFORM:&quot;.$_POST[subject];
    $message = str_replace(&quot;\\&quot;, &quot;&quot;, $_POST[comments]);
    mail($pun_config[&#039;o_admin_email&#039;], $subject, $message, $headers);
?&gt;


&lt;div class=&quot;blockform&quot;&gt;
    &lt;h2&gt;&lt;span&gt;Contact &lt;?php echo $pun_config[&#039;o_board_title&#039;]; ?&gt;&lt;/span&gt;&lt;/h2&gt;
    &lt;div class=&quot;box&quot;&gt;
        &lt;form id=&quot;contact&quot; method=&quot;post&quot; action=&quot;contact.php&quot;&gt;
            &lt;div class=&quot;inform&quot;&gt;
                &lt;fieldset&gt;
                    &lt;legend&gt;Email Sent&lt;/legend&gt;
                    &lt;div class=&quot;infldset&quot;&gt;
                        &lt;b&gt;Thank you for contacting us!&lt;/b&gt; The following information was sent to &lt;?php echo $pun_config[&#039;o_board_title&#039;]; ?&gt;.&lt;br /&gt;&lt;br /&gt;
                        &lt;label&gt;Name:&lt;br /&gt;&lt;?php echo $_POST[name]; ?&gt;&lt;br /&gt;&lt;/label&gt;
                        &lt;label&gt;Email:&lt;br /&gt;&lt;?php echo $_POST[email]; ?&gt;&lt;br /&gt;&lt;/label&gt;
                        &lt;label&gt;Subject:&lt;br /&gt;&lt;?php echo $_POST[subject]; ?&gt;&lt;br /&gt;&lt;/label&gt;
                        &lt;label&gt;Comments:&lt;br /&gt;&lt;?php echo $_POST[comments]; ?&gt;&lt;br /&gt;&lt;/label&gt;
                    &lt;/div&gt;
                &lt;/fieldset&gt;
            &lt;/div&gt;
        &lt;/form&gt;
    &lt;/div&gt;
&lt;/div&gt;

&lt;?php } } else { 
//Display the Form
$antispam = dechex(rand(hexdec(000000), hexdec(FFFFFF)));
?&gt;
&lt;script language=&quot;JavaScript&quot; type=&quot;text/JavaScript&quot;&gt;
&lt;!--
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf(&quot;?&quot;))&gt;0&amp;&amp;parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&amp;&amp;d.all) x=d.all[n]; for (i=0;!x&amp;&amp;i&lt;d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&amp;&amp;d.layers&amp;&amp;i&lt;d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x &amp;&amp; d.getElementById) x=d.getElementById(n); return x;
}

function MM_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors=&#039;&#039;,args=MM_validateForm.arguments;
  for (i=0; i&lt;(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!=&quot;&quot;) {
      if (test.indexOf(&#039;isEmail&#039;)!=-1) { p=val.indexOf(&#039;@&#039;);
        if (p&lt;1 || p==(val.length-1)) errors+=&#039;- &#039;+nm+&#039; must be an e-mail address.\n&#039;;
      } else if (test!=&#039;R&#039;) { num = parseFloat(val);
        if (isNaN(val)) errors+=&#039;- &#039;+nm+&#039; must be a number.\n&#039;;
        if (test.indexOf(&#039;inRange&#039;) != -1) { p=test.indexOf(&#039;:&#039;);
          min=test.substring(8,p); max=test.substring(p+1);
          if (num&lt;min || max&lt;num) errors+=&#039;- &#039;+nm+&#039; must be a number between &#039;+min+&#039; and &#039;+max+&#039;.\n&#039;;
    } } } else if (test.charAt(0) == &#039;R&#039;) errors += &#039;- &#039;+nm+&#039; is required.\n&#039;; }
  } if (errors) alert(&#039;The following errors occurred:\n&#039;+errors);
  document.MM_returnValue = (errors == &#039;&#039;);
}
//--&gt;
&lt;/script&gt;
&lt;div class=&quot;blockform&quot;&gt;
    &lt;h2&gt;&lt;span&gt;Contact &lt;?php echo $pun_config[&#039;o_board_title&#039;]; ?&gt;&lt;/span&gt;&lt;/h2&gt;
    &lt;div class=&quot;box&quot;&gt;
        &lt;form id=&quot;contact&quot; method=&quot;post&quot; action=&quot;contact.php&quot;&gt;
            &lt;div class=&quot;inform&quot;&gt;
                &lt;fieldset&gt;
                    &lt;legend&gt;Enter your contact details&lt;/legend&gt;
                    &lt;div class=&quot;infldset&quot;&gt;
                        Please enter your contact information and comments here. If you would like to share your comments with everyone, consider posting them on the &lt;a href=&quot;forum.php&quot;&gt;forum&lt;/a&gt; instead!&lt;br /&gt;
                        &lt;input type=&quot;hidden&quot; name=&quot;form_sent&quot; value=&quot;1&quot; /&gt;&lt;br /&gt;
                        &lt;label&gt;Name&lt;br /&gt;&lt;input type=&quot;text&quot; name=&quot;name&quot; value=&quot;&quot; size=&quot;40&quot; maxlength=&quot;40&quot; /&gt;&lt;br /&gt;&lt;/label&gt;
                        &lt;label&gt;Email&lt;br /&gt;&lt;input type=&quot;text&quot; name=&quot;email&quot; value=&quot;&quot; size=&quot;40&quot; maxlength=&quot;50&quot; /&gt;&lt;br /&gt;&lt;/label&gt;
                        &lt;label&gt;Subject&lt;br /&gt;&lt;input type=&quot;text&quot; name=&quot;subject&quot; value=&quot;&quot; size=&quot;40&quot; maxlength=&quot;50&quot; /&gt;&lt;br /&gt;&lt;/label&gt;
                        &lt;label&gt;Comments&lt;br /&gt;&lt;textarea name=&quot;comments&quot; rows=&quot;5&quot; cols=&quot;40&quot;&gt;&lt;/textarea&gt;&lt;br /&gt;&lt;/label&gt;
                        &lt;label&gt;No spam:&lt;br /&gt;&lt;input name=&quot;antispam&quot; type=&quot;text&quot; class=&quot;tekst&quot; size=&quot;6&quot;&gt; &lt;?php echo $antispam; ?&gt; &lt;input type=&quot;hidden&quot; value=&quot;&lt;?php echo $antispam; ?&gt;&quot; name=&quot;spamvalidator&quot; /&gt;&lt;/label&gt;
                    &lt;/div&gt;
                &lt;/fieldset&gt;
            &lt;/div&gt;
            &lt;p&gt;&lt;input type=&quot;submit&quot; name=&quot;update&quot; value=&quot;Submit&quot;  onClick=&quot;MM_validateForm(&#039;name&#039;,&#039;&#039;,&#039;R&#039;,&#039;email&#039;,&#039;&#039;,&#039;RisEmail&#039;,&#039;subject&#039;,&#039;&#039;,&#039;R&#039;);return document.MM_returnValue&quot; /&gt;&lt;/p&gt;
        &lt;/form&gt;
    &lt;/div&gt;
&lt;/div&gt;



&lt;?php

}    //close if statement
 
require PUN_ROOT.&#039;footer.php&#039;;</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Smartys)]]></author>
			<pubDate>Sun, 06 May 2007 21:54:46 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/93687/#p93687</guid>
		</item>
		<item>
			<title><![CDATA[Re: Error message]]></title>
			<link>https://punbb.informer.com/forums/post/93686/#p93686</link>
			<description><![CDATA[<p>Think i&#039;ve made a mistake i&#039;ve put a } on line 69 , form is displayed correctly but not processed well.<br />I don&#039;t have the confirmation message or the error message, nothing is displayed ?<br />Could someone have a look to the code above and help me to fix it ?</p><p>Regards</p>]]></description>
			<author><![CDATA[null@example.com (glucarelli)]]></author>
			<pubDate>Sun, 06 May 2007 21:47:12 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/93686/#p93686</guid>
		</item>
		<item>
			<title><![CDATA[Re: Error message]]></title>
			<link>https://punbb.informer.com/forums/post/93611/#p93611</link>
			<description><![CDATA[<p>Thanks , found where missing } was.</p>]]></description>
			<author><![CDATA[null@example.com (glucarelli)]]></author>
			<pubDate>Sat, 05 May 2007 18:28:46 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/93611/#p93611</guid>
		</item>
		<item>
			<title><![CDATA[Re: Error message]]></title>
			<link>https://punbb.informer.com/forums/post/93608/#p93608</link>
			<description><![CDATA[<p>You&#039;re missing a closing }</p>]]></description>
			<author><![CDATA[null@example.com (Smartys)]]></author>
			<pubDate>Sat, 05 May 2007 18:11:18 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/93608/#p93608</guid>
		</item>
		<item>
			<title><![CDATA[Error message]]></title>
			<link>https://punbb.informer.com/forums/post/93603/#p93603</link>
			<description><![CDATA[<p>Tried to implement an anti-spam captcha code on modified contact form found here :<br /><a href="http://www.punres.org/viewtopic.php?id=1460">Contact Form 1.0.0</a></p><p>But i have an error :<br /></p><div class="codebox"><pre><code>Parse error: parse error, unexpected $ in /forum/contact.php on line 125</code></pre></div><p>Here is my contact.php :<br /></p><div class="codebox"><pre><code>&lt;?php
define(&#039;PUN_ROOT&#039;, &#039;./&#039;);
define(&#039;PUN_QUIET_VISIT&#039;, 1);
require PUN_ROOT.&#039;include/common.php&#039;;
$page_title = pun_htmlspecialchars($pun_config[&#039;o_board_title&#039;]) . &#039; / Contact&#039;;        //Set the page title here
define(&#039;PUN_ALLOW_INDEX&#039;, 1);
require PUN_ROOT.&#039;header.php&#039;;
require PUN_ROOT.&#039;include/parser.php&#039;;
//echo &quot;&lt;PRE&gt;&quot;; print_r ($pun_config); echo &quot;&lt;/PRE&gt;&quot;;

if ($_POST[form_sent] == 1) {
//Process The Form
?&gt;

&lt;?php
    $as = $_POST[&#039;antispam&#039;];
$as2 = $_POST[&#039;spamvalidator&#039;];
 if ($as != $as2){
?&gt;
&lt;div class=&quot;blockform&quot;&gt;
    &lt;h2&gt;&lt;span&gt;Contact &lt;?php echo $pun_config[&#039;o_board_title&#039;]; ?&gt;&lt;/span&gt;&lt;/h2&gt;
    &lt;div class=&quot;box&quot;&gt;
        &lt;form id=&quot;contact&quot; method=&quot;post&quot; action=&quot;contact.php&quot;&gt;
            &lt;div class=&quot;inform&quot;&gt;
                &lt;fieldset&gt;
                    &lt;legend&gt;Email not sent&lt;/legend&gt;
                    &lt;div class=&quot;infldset&quot;&gt;
                        &lt;b&gt;Your mail could not be sent!&lt;/b&gt; The antispamcode you entered did not match.
                    &lt;/div&gt;
                &lt;/fieldset&gt;
            &lt;/div&gt;
        &lt;/form&gt;
    &lt;/div&gt;
&lt;/div&gt;
&lt;?php
      }elseif($as == $as2){
    $recipient = &quot;$toName &lt;&quot;.$toMail.&quot;&gt;&quot;;
    $headers =&quot;From: &quot;.$_POST[name].&quot; &lt;&quot;.$_POST[email].&quot;&gt;&quot;;
    $subject = &quot;WEBFORM:&quot;.$_POST[subject];
    $message = str_replace(&quot;\\&quot;, &quot;&quot;, $_POST[comments]);
    mail($pun_config[&#039;o_admin_email&#039;], $subject, $message, $headers);
?&gt;


&lt;div class=&quot;blockform&quot;&gt;
    &lt;h2&gt;&lt;span&gt;Contact &lt;?php echo $pun_config[&#039;o_board_title&#039;]; ?&gt;&lt;/span&gt;&lt;/h2&gt;
    &lt;div class=&quot;box&quot;&gt;
        &lt;form id=&quot;contact&quot; method=&quot;post&quot; action=&quot;contact.php&quot;&gt;
            &lt;div class=&quot;inform&quot;&gt;
                &lt;fieldset&gt;
                    &lt;legend&gt;Email Sent&lt;/legend&gt;
                    &lt;div class=&quot;infldset&quot;&gt;
                        &lt;b&gt;Thank you for contacting us!&lt;/b&gt; The following information was sent to &lt;?php echo $pun_config[&#039;o_board_title&#039;]; ?&gt;.&lt;br /&gt;&lt;br /&gt;
                        &lt;label&gt;Name:&lt;br /&gt;&lt;?php echo $_POST[name]; ?&gt;&lt;br /&gt;&lt;/label&gt;
                        &lt;label&gt;Email:&lt;br /&gt;&lt;?php echo $_POST[email]; ?&gt;&lt;br /&gt;&lt;/label&gt;
                        &lt;label&gt;Subject:&lt;br /&gt;&lt;?php echo $_POST[subject]; ?&gt;&lt;br /&gt;&lt;/label&gt;
                        &lt;label&gt;Comments:&lt;br /&gt;&lt;?php echo $_POST[comments]; ?&gt;&lt;br /&gt;&lt;/label&gt;
                    &lt;/div&gt;
                &lt;/fieldset&gt;
            &lt;/div&gt;
        &lt;/form&gt;
    &lt;/div&gt;
&lt;/div&gt;

&lt;?php } else { 
//Display the Form
$antispam = dechex(rand(hexdec(000000), hexdec(FFFFFF)));
?&gt;
&lt;script language=&quot;JavaScript&quot; type=&quot;text/JavaScript&quot;&gt;
&lt;!--
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf(&quot;?&quot;))&gt;0&amp;&amp;parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&amp;&amp;d.all) x=d.all[n]; for (i=0;!x&amp;&amp;i&lt;d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&amp;&amp;d.layers&amp;&amp;i&lt;d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x &amp;&amp; d.getElementById) x=d.getElementById(n); return x;
}

function MM_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors=&#039;&#039;,args=MM_validateForm.arguments;
  for (i=0; i&lt;(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!=&quot;&quot;) {
      if (test.indexOf(&#039;isEmail&#039;)!=-1) { p=val.indexOf(&#039;@&#039;);
        if (p&lt;1 || p==(val.length-1)) errors+=&#039;- &#039;+nm+&#039; must be an e-mail address.\n&#039;;
      } else if (test!=&#039;R&#039;) { num = parseFloat(val);
        if (isNaN(val)) errors+=&#039;- &#039;+nm+&#039; must be a number.\n&#039;;
        if (test.indexOf(&#039;inRange&#039;) != -1) { p=test.indexOf(&#039;:&#039;);
          min=test.substring(8,p); max=test.substring(p+1);
          if (num&lt;min || max&lt;num) errors+=&#039;- &#039;+nm+&#039; must be a number between &#039;+min+&#039; and &#039;+max+&#039;.\n&#039;;
    } } } else if (test.charAt(0) == &#039;R&#039;) errors += &#039;- &#039;+nm+&#039; is required.\n&#039;; }
  } if (errors) alert(&#039;The following errors occurred:\n&#039;+errors);
  document.MM_returnValue = (errors == &#039;&#039;);
}
//--&gt;
&lt;/script&gt;
&lt;div class=&quot;blockform&quot;&gt;
    &lt;h2&gt;&lt;span&gt;Contact &lt;?php echo $pun_config[&#039;o_board_title&#039;]; ?&gt;&lt;/span&gt;&lt;/h2&gt;
    &lt;div class=&quot;box&quot;&gt;
        &lt;form id=&quot;contact&quot; method=&quot;post&quot; action=&quot;contact.php&quot;&gt;
            &lt;div class=&quot;inform&quot;&gt;
                &lt;fieldset&gt;
                    &lt;legend&gt;Enter your contact details&lt;/legend&gt;
                    &lt;div class=&quot;infldset&quot;&gt;
                        Please enter your contact information and comments here. If you would like to share your comments with everyone, consider posting them on the &lt;a href=&quot;forum.php&quot;&gt;forum&lt;/a&gt; instead!&lt;br /&gt;
                        &lt;input type=&quot;hidden&quot; name=&quot;form_sent&quot; value=&quot;1&quot; /&gt;&lt;br /&gt;
                        &lt;label&gt;Name&lt;br /&gt;&lt;input type=&quot;text&quot; name=&quot;name&quot; value=&quot;&quot; size=&quot;40&quot; maxlength=&quot;40&quot; /&gt;&lt;br /&gt;&lt;/label&gt;
                        &lt;label&gt;Email&lt;br /&gt;&lt;input type=&quot;text&quot; name=&quot;email&quot; value=&quot;&quot; size=&quot;40&quot; maxlength=&quot;50&quot; /&gt;&lt;br /&gt;&lt;/label&gt;
                        &lt;label&gt;Subject&lt;br /&gt;&lt;input type=&quot;text&quot; name=&quot;subject&quot; value=&quot;&quot; size=&quot;40&quot; maxlength=&quot;50&quot; /&gt;&lt;br /&gt;&lt;/label&gt;
                        &lt;label&gt;Comments&lt;br /&gt;&lt;textarea name=&quot;comments&quot; rows=&quot;5&quot; cols=&quot;40&quot;&gt;&lt;/textarea&gt;&lt;br /&gt;&lt;/label&gt;
                        &lt;label&gt;No spam:&lt;br /&gt;&lt;input name=&quot;antispam&quot; type=&quot;text&quot; class=&quot;tekst&quot; size=&quot;6&quot;&gt; &lt;?php echo $antispam; ?&gt; &lt;input type=&quot;hidden&quot; value=&quot;&lt;?php echo $antispam; ?&gt;&quot; name=&quot;spamvalidator&quot; /&gt;&lt;/label&gt;
                    &lt;/div&gt;
                &lt;/fieldset&gt;
            &lt;/div&gt;
            &lt;p&gt;&lt;input type=&quot;submit&quot; name=&quot;update&quot; value=&quot;Submit&quot;  onClick=&quot;MM_validateForm(&#039;name&#039;,&#039;&#039;,&#039;R&#039;,&#039;email&#039;,&#039;&#039;,&#039;RisEmail&#039;,&#039;subject&#039;,&#039;&#039;,&#039;R&#039;);return document.MM_returnValue&quot; /&gt;&lt;/p&gt;
        &lt;/form&gt;
    &lt;/div&gt;
&lt;/div&gt;



&lt;?php

}    //close if statement
 
require PUN_ROOT.&#039;footer.php&#039;;</code></pre></div><p>Any advice ?</p><p>Regards</p>]]></description>
			<author><![CDATA[null@example.com (glucarelli)]]></author>
			<pubDate>Sat, 05 May 2007 16:55:36 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/93603/#p93603</guid>
		</item>
	</channel>
</rss>
