PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
saravana
Forum Newbie
Posts: 1 Joined: Mon Jan 26, 2009 10:47 pm
Post
by saravana » Mon Jan 26, 2009 11:02 pm
Hi All
I am a newbie to PHP. I need your help. Iam getting blank page when i submit the form. but its working very well in localhost.
Code: Select all
if(isset($_POST["Submit"]))
{
require("class.phpmailer.php");
$mail = new PHPMailer();
$toaddress = $sender;
$mailhost = "HOST NAME";
$fromaddress = "USERNAME";
$frompwd = "PASSWORD";
$subject = $_REQUEST["txtSelect"];
$fromname = $sName;
$body = $message;
$rplyto = $sEmail; //$msgbody = $fromname . "<br>" . $rplyto . "<br>" . $body; $mail->IsSMTP(); $mail->Host = $mailhost; $mail->SMTPAuth = true; $mail->Username = $fromaddress; $mail->Password = $frompwd; $mail->From = $fromaddress; $mail->FromName = $fromname; $mail->AddReplyTo($rplyto); $mail->AddAddress($toaddress); $mail->IsHTML(true); $mail->Subject = $subject; $mail->Body = $body; if(!$mail->Send()) { echo = "Message could not be sent. <p>"; exit;}echo = "Thank you, your message has been sent!"; }
jaoudestudios
DevNet Resident
Posts: 1483 Joined: Wed Jun 18, 2008 8:32 am
Location: Surrey
Post
by jaoudestudios » Tue Jan 27, 2009 1:16 am
You must have an error, but your errors are off on production (how it should be), so you are getting a blank page...check the error log.