Okay, I'm still not getting it to work properly.
This is my original code for the .php file that controlled the input values and where the email is sent to and so on.
So what I'm gathering, is that I somehow need to split this code in between "contact.php" and "contact-thanks.php"
Also, I still want to ensure that I keep any entered values (e.g., name, email, subject, etc.).
Also, without the HTML that draws the rest of the page, here is the actual form code embedded within:
Edited by VaiFanatic - 8/6/12 at 11:58pm
This is my original code for the .php file that controlled the input values and where the email is sent to and so on.
So what I'm gathering, is that I somehow need to split this code in between "contact.php" and "contact-thanks.php"
Also, I still want to ensure that I keep any entered values (e.g., name, email, subject, etc.).
Code:
<?php
$mailto = 'info@regibase.us' ;
$subject = "Contact form message - RBF-US" ;
$formurl = "http://www.regibase.us/contact-error.php" ;
$errorurl = "http://www.regibase.us/contact-error.php" ;
$thankyouurl = "http://www.regibase.us/contact-thanks.php" ;
// -------------------- END OF CONFIGURABLE SECTION ---------------
$name = $_POST['name'] ;
$email = $_POST['email'] ;
$subject = $_POST['subject'] ;
$comments = $_POST['comments'] ;
$spam=$_POST['spam'] ;
$http_referrer = getenv( "HTTP_REFERER" );
if (!isset($_POST['email'])) {
header( "Location: $formurl" );
exit ;
}
if (empty($name) || empty($email) || empty($subject) || empty($comments) || $spam!="78260") {
header( "Location: $errorurl" );
exit ;
}
$name = strtok( $name, "\r\n" );
$email = strtok( $email, "\r\n" );
$subject = strtok( $subject, "\r\n" );
if (get_magic_quotes_gpc()) {
$comments = stripslashes( $comments );
}
$messageproper ="---------- Sent VIA Contact Page (TFPS) ----------\n\n" . "\nSent by : " . $name . "\nEmail : " . $email . "\nSubject : " . $subject . "\n\n\nMessage : " . $comments;
mail($mailto, $subject, $messageproper, "From: \"$name\" <$email>\r\nReply-To: \"$name\" <$email>\r\nX-Mailer: chfeedback.php 2.04" );
header( "Location: $thankyouurl" );
exit ;
?>
Also, without the HTML that draws the rest of the page, here is the actual form code embedded within:
Code:
<form action="contact_thanks.php" method="POST">
<fieldset>
<legend>Your contact information</legend>
<p style="margin-left:70px">
<label><strong>Name:</strong></label>
<span class="asterisk"><font color="#FF0000">*</font></span><br />
<input name="name" type="text" class="sub_bg3" value="<?php echo $_POST['name'];?>" />
</p>
<p style="margin-left:70px">
<label><strong>Email:</strong></label>
<span class="asterisk"><font color="#FF0000">*</font></span><br />
<input name="email" type="text" class="sub_bg3" value="<?php echo $_POST['email'];?>" />
</p>
<p style="margin-left:70px">
<label><strong>Subject:</strong></label>
<span class="asterisk"><font color="#FF0000">*</font></span><br />
<input name="subject" type="text" class="sub_bg3" value="<?php echo $_POST['subject'];?>" />
</p>
<p class="asterisk" style="margin-left:70px; color: #F00;">* <span class="ital">required entries</span></p>
<br />
</fieldset>
<fieldset>
<legend>Your message</legend>
<p style="margin-left:70px">
<label><strong>Message:</strong></label>
<br />
<textarea name="comments" cols="50" rows="7" class="sub_bg3" value="<?php echo $_POST['comments'];?>"></textarea>
</p>
<p style="margin-left:70px"><img src="images/LockIcon.png" width="15" height="20" /> Security pass-code = <strong style="color: #0000FF">78260</strong><br />
<strong>Please enter the <strong style="color: #0000ff">blue</strong> pass-code provided above:</strong><br />
<input name="spam" type="text" class="sub_bg3" value="" />
</p>
<p style="margin-left:70px">
<input class="button" name="submit" type="submit" value="Send" />
</p>
</fieldset>
</form>
Edited by VaiFanatic - 8/6/12 at 11:58pm






