Dynadot .com transfer sale, only $10.12 with coupon code DYNA12, available while supplies last, ends October 31, 2026.

Need help with contact form

Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
Spacemail by SpaceshipSpacemail by Spaceship
Watch

hangman21

Established Member
Impact
1
here is my code and i want to redirect my thank you page, how can i do that? thanks

<?php
// Contact subject
$subject ="$subject";
// Details
$message="$message";

// Mail of sender
$mail_from="$email";
// From
$header="from: $name <$mail_from>";

// Enter your email address
$to ='[email protected]';

$send_contact=mail($to,$subject,$message,$header);

// Check, if message sent to your email
// display message "We've recived your information"
if($send_contact){
echo "www.mywebsite.com/thankyou";
}
else {
echo "ERROR";
}
?>
 
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
Instead of the "echo" ...
header("Location:www.mywebsite.com/thankyou");

Hopefully you're sanitizing those variables someplace earlier in the code?
 
0
Close
add this to the "additional settings" section:

on_sent_ok: "location.replace('http://www.YOURSITE.com');"
 
0
Close
DomainEasy: white label portfolios are live. Enable yours.

We're social

Escrow.com
Spaceship
CryptoExchange.com
Domain Recover

NamePros updates

Quick replies: search, your most used replies, and more on every post
Quick replies are easier to find and use now. The quick reply menu has a search box. Type a few letters to find the reply you want. A...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back