Page 1 of 1

Displaying blank Page When Form Submit

Posted: Mon Jan 26, 2009 11:02 pm
by saravana
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!"; } 

Re: Displaying blank Page When Form Submit

Posted: Tue Jan 27, 2009 1:16 am
by jaoudestudios
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.