White Screen after posting

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

Post Reply
cecilchampenois
Forum Commoner
Posts: 47
Joined: Thu Nov 06, 2014 10:29 am
Location: Gilbert, Arizona
Contact:

White Screen after posting

Post by cecilchampenois »

I can't see it, but maybe I left out a bracket, or faced a bracket the wrong direction. I am not sure. Going to post this and review again. Maybe I should get some reading glasses.

Code: Select all

	// 12/09/2014 Cecil Champenois. Set the email up to send to Client 40023, or 40024.
	// Added additional conditions to account for the fact that the user may not enter an email address.
	if (($_SESSION['active_client'] == 40024) || ($_SESSION['active_client'] == 40023)) {
	    if $_POST['EmailList']=="" {
			// There is nothing in the Session email address variable, EmailList.
			$_POST['EmailList']=$_POST['EmailList'] . "searshc@ap-audit.com" . "," . $_SESSION['user_email'];
		} else {
			// 12/09/2014 Cecil Champenois. In the below case, the user has entered an email address.
			// The email address which the user entered will precede the following clinet's and User's own email addresses.
			$_POST['EmailList']=$_POST['EmailList'] . ",searshc@ap-audit.com" . "," . $_SESSION['user_email'];
		}
	} else { // 12/09/2014 Cecil Champenois. If it's not 40023 (or40024), then send whatever the user types in and also the user's email address.
	// 12/09/2014 Cecil. New line of code to pass user_email over to EmailList.
		if ($_POST['EmailList']=="") {
			$_POST['EmailList']=$_SESSION['user_email'];
		} else {
			$_POST['EmailList']=$_POST['EmailList'] . "," . $_SESSION['user_email'];
		}
	}

	$email_to=$_POST['EmailList'];

	$headers = "From: " . $email_from;

//more code that isn't showing...
Cecil Champenois
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: White Screen after posting

Post by Celauran »

Code: Select all

if $_POST['EmailList']==""
Need some parens around your condition.
cecilchampenois
Forum Commoner
Posts: 47
Joined: Thu Nov 06, 2014 10:29 am
Location: Gilbert, Arizona
Contact:

Re: White Screen after posting

Post by cecilchampenois »

Oh my gosh! You are so right. I just didn't see that. Thank you so much! I really appreciate the second set of eyes.
Celauran wrote:

Code: Select all

if $_POST['EmailList']==""
Need some parens around your condition.
Cecil Champenois
Post Reply