Jump to content

caliray

New Members
  • Posts

    3
  • Joined

  • Last visited

Posts posted by caliray

  1. I have a bit of php code to send me an email when someone logs in to my site. I want to include the person's name and two other bits from my database, but I can't get the formatting correct. I keep getting errors when I try to load the page. Here's the code which obviously has mistakes. The first code works, it's the second one that does not work for the $message line .

    if (mysql_num_rows($exe) == 1) {
    		  	$message_m = "Someone with RefCode ".$RefC." has viewed the homepage for the first time.";
    			mail("ray.fellers@gmail.com", "Good News! Someone just logged in to view the home page", $message_m);
    		  	setcookie("has_entered_correct_refcode", "true", time()+27000000, "/");
    		  	setcookie("has_entered_correct_refcode_value", $_POST["refcode"], time()+27000000, "/");
    		  	header("Location: /index.php");
    		  	die();
    
    if (mysql_num_rows($exe) == 1) {
    		  	$message_m =" "'.$_POST['fname'].'," with RefCode "'.$RefC.'," and refund amount of "'.$_POST['refvalact'].'," has viewed the homepage.";
    			mail("ray.fellers@gmail.com", "Good News! Someone just logged in to view the home page", $message_m);
    
    		  	setcookie("has_entered_correct_refcode", "true", time()+27000000, "/");
    		  	setcookie("has_entered_correct_refcode_value", $_POST["refcode"], time()+27000000, "/");
    		  	header("Location: /index.php");
    		  	die();
    		  }
    

    Thanks for any help to resolve this.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.