| You are here: DEVPPL ‹ Forum ‹ Programming ‹ PHP and MySQL Forum |
NOTIFICATIONS
|
|
|||||||||||||||
Login |
html/javascript response to php mailresult=OK?
3 posts
• Page 1 of 1
0
html/javascript response to php mailresult=OK?
Hi all,
I'm new to php, but managed to get a domail.php working. My form from my html website is sent by the php file to my email address. However, the php echoes a mailresult upon successful sending, but how can I let my website respond to this mailresult?? I'd like to go to a different page, when the mailresult==OK, so something in my html file like
if($mailResult==OK){
//go to page saying, your mail has been sent!
}
OR I could change the "OK" to something more like "Thank you, your mail has been received" in the php file, because this text IS shown in my browser window. Then I would need to know how to make the layout of the window saying this fit my website layout, because now the text is just in a white plain frame..
Hope you guys can help me with either of those two options. Thanks a ton!!
Jay
I'm new to php, but managed to get a domail.php working. My form from my html website is sent by the php file to my email address. However, the php echoes a mailresult upon successful sending, but how can I let my website respond to this mailresult?? I'd like to go to a different page, when the mailresult==OK, so something in my html file like
if($mailResult==OK){
//go to page saying, your mail has been sent!
}
OR I could change the "OK" to something more like "Thank you, your mail has been received" in the php file, because this text IS shown in my browser window. Then I would need to know how to make the layout of the window saying this fit my website layout, because now the text is just in a white plain frame..
Hope you guys can help me with either of those two options. Thanks a ton!!
Jay
- Jerohero
- Reputation: 0
- Posts: 2
- Joined: Sat Sep 05, 2009 9:47 am
- Highscores: 0
- Arcade winning challenges: 0
html/javascript response to php mailresult=OK? - Sponsored results
- Sponsored results
0
Re: html/javascript response to php mailresult=OK?
jay,
what web host are you using and how did you dev your site? Also, do you mind posting your site so i can see what the form action is now?
tim.
what web host are you using and how did you dev your site? Also, do you mind posting your site so i can see what the form action is now?
tim.
- Djtonic
- Reputation: 0
- Posts: 88
- Joined: Tue Sep 08, 2009 1:38 am
- Highscores: 0
- Arcade winning challenges: 0
0
Re: html/javascript response to php mailresult=OK?
Hey Jay
Inside your IF statement add:
sent.php can be any file that you want to redirect to.
Cheers,
Inside your IF statement add:
- Code: Select all
print "<script>";
print " self.location='sent.php';";
print "</script>";
sent.php can be any file that you want to redirect to.
Cheers,
- Dflynn
- Reputation: 0
- Posts: 860
- Joined: Wed Oct 03, 2007 10:06 pm
- Location: Guelph, Canada
- Highscores: 0
- Arcade winning challenges: 0
|
|