Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The best idea would be to actually put the contents of <code>mailer.php</code> inside of <code>contactform.php</code>, so you wont need any redirects, no URL full of variables, no nothing.</p> <p>The outcome of this would be something along the lines of:</p> <pre><code>&lt;?php $state = 0; // check to see if verificaton code was correct if(md5($verif_box).'a4xn' == $_COOKIE['tntcon']){ // if verification code was correct send the message and show this page mail("myemail@gmail.com", 'Online Form: '.$subject, "\n".$message." \n\n".$name."\n\n".$lastname."\n\n".$from."\n\n".$_SERVER['REMOTE_ADDR']."\n\n".'mailinglist: '.$mailinglist, "From: $from"); // delete the cookie so it cannot sent again by refreshing this page setcookie('tntcon',''); $state = 2; } else if(isset($message) and $message!=""){ // if verification code was incorrect then return to contact page and show error $state = 1; } if ($state == 0) { ?&gt; &lt;form action="" method="post" name="form1" id="form1" onsubmit="MM_validateForm('from','','RisEmail','name','','R','verif_box','','R','message','','R');return document.MM_returnValue"&gt; &lt;!-- All the form that I dont want to copy paste... --&gt; &lt;/form&gt; &lt;?php } else if ($state == 1) { ?&gt; Message for wrong verification code. &lt;?php } else if ($state == 2) { ?&gt; Message for email sent. &lt;?php } ?&gt; </code></pre> <p>I changed the forms target attribute so it doesnt go to mailer.php and changed the opening php a bit to make it work with this distribution of things. You should change the input code to populate it with the POST data, instead of GET and you would avoid having that nasty looking URL.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload