But the code seems to be in place:

$msg .= Website Music - Thank You for your Purchase! \n\n";

I still don't understand what is missing.

Again, I am new to php so please forgive my lack of knowledge.

    I finally see what you were telling me to correct. That was actually my error in posting the code. Here is a corrected post. I still have the original error -- on line 201. I have added the quote tags to this post. Hopefully I did that right.

    if (strcmp ($res, "VERIFIED") == 0) {
    
    $notify_email =  "tulip88@website.com";         //email address to which debug emails are sent to
    
    $DB_Server = "localhost"; //your MySQL Server
    $DB_Username = "xxxxxxxxxx"; //your MySQL User Name
    $DB_Password = "xxxxxxxxxx"; //your MySQL Password
    $DB_DBName = "xxxxxxxxxxxx"; //your MySQL Database Name
    
    
    
    //create MySQL connection
    $Connect = @mysql_connect($DB_Server, $DB_Username, $DB_Password)
    or die("Couldn't connect to MySQL:<br>" . mysql_error() . "<br>" . mysql_errno());
    
    
    //select database
    $Db = @mysql_select_db($DB_DBName, $Connect)
    or die("Couldn't select database:<br>" . mysql_error(). "<br>" . mysql_errno());
    
    
    $fecha = date("m")."/".date("d")."/".date("Y");
    $fecha = date("Y").date("m").date("d");
    
    //check if transaction ID has been processed before
    $checkquery = "select txnid from paypal_payment_info where txnid='".$txn_id."'";
    $sihay = mysql_query($checkquery) or die("Duplicate txn id check query failed:<br>" . mysql_error() . "<br>" . mysql_errno());
    $nm = mysql_num_rows($sihay);
    if ($nm == 0){
    
    //execute query
    
    
    
    if ($txn_type == "cart"){
    $strQuery = "insert into paypal_payment_info(paymentstatus,buyer_email,firstname,lastname,street,city,state,zipcode,country,mc_gross,mc_fee,memo,paymenttype,paymentdate,txnid,pendingreason,reasoncode,tax,datecreation) values ('".$payment_status."','".$payer_email."','".$first_name."','".$last_name."','".$address_street."','".$address_city."','".$address_state."','".$address_zip."','".$address_country."','".$mc_gross."','".$mc_fee."','".$memo."','".$payment_type."','".$payment_date."','".$txn_id."','".$pending_reason."','".$reason_code."','".$tax."','".$fecha."')";
    
     $result = mysql_query($strQuery) or die("Cart - paypal_payment_info, Query failed:<br>" . mysql_error() . "<br>" . mysql_errno());
     for ($i = 1; $i <= $num_cart_items; $i++) {
         $itemname = "item_name".$i;
         $itemnumber = "item_number".$i;
         $on0 = "option_name1_".$i;
         $os0 = "option_selection1_".$i;
         $on1 = "option_name2_".$i;
         $os1 = "option_selection2_".$i;
         $quantity = "quantity".$i;
    
         $struery = "insert into paypal_cart_info(txnid,itemnumber,itemname,os0,on0,os1,on1,quantity,invoice,custom) values ('".$txn_id."','".$_POST[$itemnumber]."','".$_POST[$itemname]."','".$_POST[$on0]."','".$_POST[$os0]."','".$_POST[$on1]."','".$_POST[$os1]."','".$_POST[$quantity]."','".$invoice."','".$custom."')";
         $result = mysql_query($struery) or die("Cart - paypal_cart_info, Query failed:<br>" . mysql_error() . "<br>" . mysql_errno());
    
     }
    }
    
    
    
    else{
     $strQuery = "insert into paypal_payment_info(paymentstatus,buyer_email,firstname,lastname,street,city,state,zipcode,country,mc_gross,mc_fee,itemnumber,itemname,os0,on0,os1,on1,quantity,memo,paymenttype,paymentdate,txnid,pendingreason,reasoncode,tax,datecreation) values ('".$payment_status."','".$payer_email."','".$first_name."','".$last_name."','".$address_street."','".$address_city."','".$address_state."','".$address_zip."','".$address_country."','".$mc_gross."','".$mc_fee."','".$item_number."','".$item_name."','".$option_name1."','".$option_selection1."','".$option_name2."','".$option_selection2."','".$quantity."','".$memo."','".$payment_type."','".$payment_date."','".$txn_id."','".$pending_reason."','".$reason_code."','".$tax."','".$fecha."')";
     $result = mysql_query("insert into paypal_payment_info(paymentstatus,buyer_email,firstname,lastname,street,city,state,zipcode,country,mc_gross,mc_fee,itemnumber,itemname,os0,on0,os1,on1,quantity,memo,paymenttype,paymentdate,txnid,pendingreason,reasoncode,tax,datecreation) values ('".$payment_status."','".$payer_email."','".$first_name."','".$last_name."','".$address_street."','".$address_city."','".$address_state."','".$address_zip."','".$address_country."','".$mc_gross."','".$mc_fee."','".$item_number."','".$item_name."','".$option_name1."','".$option_selection1."','".$option_name2."','".$option_selection2."','".$quantity."','".$memo."','".$payment_type."','".$payment_date."','".$txn_id."','".$pending_reason."','".$reason_code."','".$tax."','".$fecha."')") or die("Default - paypal_payment_info, Query failed:<br>" . mysql_error() . "<br>" . mysql_errno());
    }
    
    
    
    
    // send an email in any case
    	 // mail($notify_email, "VERIFIED IPN", "$res\n $req\n $strQuery\n $struery\n  $strQuery2");
    $msg .= "Website Music - Thank You for your Purchase! \n\n";
    $msg .= "Payment Details \n\n";
    $msg .= "Name: ".$first_name." ".$last_name." \n";
    $msg .= "Your Email: ".$payer_email." \n";
    $msg .= "Transaction ID: ".$txn_id." \n\n";
    $msg .= $msg1;
    $msg .= " \n\n";
    $msg .= "The email address we used to send this Transaction Notice is only used for product delivery purposes, so please do not respond or attempt to correspond with us by replying to this email. No one will ever see it. \n\n";
    $msg .= "If you have any questions regarding your order, please contact us at Orders@website.com or you may want to review our Contact page here http://www.website.com/index-new.php?p=contact \n\n";
    $msg .= "If you have an account at www.PayPal.com, you can log in and review the details of this transaction. \n\n";
    if ($send_link == "yes" ) {
    $msg .= "To access your Download(s) use the following link: \n";
    $msg .= "http://www.website.com/DL/GetFiles.php?ta=".$txn_id."&ad=".$payer_email."  \n\n";
    }
    $msg .= "Thank you for allowing us to serve you, it is our great pleasure. \n\n";
    $msg .= "xxxxx Founder \n";
    $msg .= "Website Music \n\n";
    mail($payer_email, "Website Music - Information", $msg, $mailheaders);
    $msg = "";
    
    
    // Mail to Joe
    $msg .= "Hello Joe You have a new sale! \n\n";
    $msg .= "Payment Details \n\n";
    $msg .= "Name: ".$first_name." ".$last_name." \n";
    $msg .= "Your Email: ".$payer_email." \n";
    $msg .= "Transaction ID: ".$txn_id." \n\n";
    $msg .= "~~~~~~~~~~~~~~      Address      ~~~~~~~~~~~~~~~~ \n";
    $msg .= $address_street." \n";
    $msg .= $address_city.", ";
    $msg .= $address_state." ";
    $msg .= $address_zip." \n";
    $msg .= "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \n";
    $msg .= " \n\n";
    $msg .= $msg1;
    $msg .= " \n\n";
    if ($send_link == "yes" ) {
    $msg .= "Here is their Download page: \n";
    $msg .= "http://www.website.com/DL/GetFiles.php?ta=".$txn_id."&ad=".$payer_email."  \n\n";
    }
    $msg .= "Have a nice day Joe. \n\n";
    $msg .= "Ken \n";
    $msg .= " \n\n";
    mail($notify_email, "VERIFIED IPN", $msg, $mailheaders);
    }
    else {
    // send an email mail($to, $subject, $msg, $mailheaders);
    $msg = "$res\n $req \n $strQuery\n $struery\n  $strQuery2";
    mail($notify_email, "VERIFIED DUPLICATED TRANSACTION", $msg, $headers);
    }
    
    //subscription handling branch
    if ( $txn_type == "subscr_signup"  ||  $txn_type == "subscr_payment"  ) {
    
      // insert subscriber payment info into paypal_payment_info table
      $strQuery = "insert into paypal_payment_info(paymentstatus,buyer_email,firstname,lastname,street,city,state,zipcode,country,mc_gross,mc_fee,memo,paymenttype,paymentdate,txnid,pendingreason,reasoncode,tax,datecreation) values ('".$payment_status."','".$payer_email."','".$first_name."','".$last_name."','".$address_street."','".$address_city."','".$address_state."','".$address_zip."','".$address_country."','".$mc_gross."','".$mc_fee."','".$memo."','".$payment_type."','".$payment_date."','".$txn_id."','".$pending_reason."','".$reason_code."','".$tax."','".$fecha."')";
      $result = mysql_query($strQuery) or die("Subscription - paypal_payment_info, Query failed:<br>" . mysql_error() . "<br>" . mysql_errno());
    
    
         // insert subscriber info into paypal_subscription_info table
        $strQuery2 = "insert into paypal_subscription_info(subscr_id , sub_event, subscr_date ,subscr_effective,period1,period2, period3, amount1 ,amount2 ,amount3,  mc_amount1,  mc_amount2,  mc_amount3, recurring, reattempt,retry_at, recur_times, username ,password, payment_txn_id, subscriber_emailaddress, datecreation) values ('".$subscr_id."', '".$txn_type."','".$subscr_date."','".$subscr_effective."','".$period1."','".$period2."','".$period3."','".$amount1."','".$amount2."','".$amount3."','".$mc_amount1."','".$$mc_amount2."','".$$mc_amount3."','".$recurring."','".$reattempt."','".$retry_at."','".$recur_times."','".$username."','".$password."', '".$txn_id."','".$payer_email."','".$fecha."')";
        $result = mysql_query($strQuery2) or die("Subscription - paypal_subscription_info, Query failed:<br>" . mysql_error() . "<br>" . mysql_errno());
    
    
             mail($notify_email, "VERIFIED IPN", "$res\n $req\n $strQuery\n $struery\n  $strQuery2");
    
    }
    }
    
    // if the IPN POST was 'INVALID'...do this
    
    
    else if (strcmp ($res, "INVALID") == 0) {
    // log for manual investigation
    
    mail($notify_email, "INVALID IPN", "$res\n $req\n $headers");
    }
    
    fclose ($fp);
    }
    ?>
    

      Hi, the line ...

      fclose ($fp);

      ... assumes that $fp is a 'file pointer', meaning that somewhere earlier in the code there should be a line similar to...

      $fp = fopen(...);

      ... which opens a file.

      Can't see 'fopen' anywhere in the code you posted - have you posted the whole code?

      P.

        I have a few lines of code at the top which describe the variables:

        // assign posted variables to local variables
        $item_name = $_POST['item_name'];
        $business = $_POST['business'];
        $item_number = $_POST['item_number'];
        $payment_status = $_POST['payment_status'];

        I just searched the document and I don't see an fopen either. Should I remove it?

          So, to be sure, the entirety of the code is what you posted before plus, at the top, just these assignments. No includes, requires or anything else.

          If that's the case then yes, comment out the last two lines ...

          mail($notify_email, "INVALID IPN", "$res\n $req\n $headers");
          }
          
          //fclose ($fp);
          //}

          ... and see if that works.

          P

            Yes, that worked! The page comes up clean now. However, I still have a problem. The page should send out 2 emails.

            The first email is showing in the code here:

             
                // send an email in any case

            The second email is showing in the code here:

            	// Mail to Joe

            I was receiving the "mail to joe" with the original error. With the error corrected, I am still only receiving one email. The funny thing is, this worked before. I simply moved the site from one server to another. Please let me know if I should repost the code. Thank you!

              I'm afraid we still haven't established whether this is the 'whole' code.

              I just noticed in your earlier post (at the top) you have ...

              if (strcmp ($res, "VERIFIED") == 0) {

              Here $res must be the result of something (probably a return from a database) ... there must be more to it than what you're showing us.

              Check again - post the whole code up otherwise we'll get in a mess (remember to XXX out any personal details as you did before).

              P.

                My full page is too long for the board. I will post the top section here. This is everything that was missing from the original post.

                // assign posted variables to local variables
                $item_name = $_POST['item_name'];
                $business = $_POST['business'];
                $item_number = $_POST['item_number'];
                $payment_status = $_POST['payment_status'];
                $mc_gross = $_POST['mc_gross'];
                $payment_currency = $_POST['mc_currency'];
                $txn_id = $_POST['txn_id'];
                $receiver_email = $_POST['receiver_email'];
                $receiver_id = $_POST['receiver_id'];
                $quantity = $_POST['quantity'];
                $num_cart_items = $_POST['num_cart_items'];
                $payment_date = $_POST['payment_date'];
                $first_name = $_POST['first_name'];
                $last_name = $_POST['last_name'];
                $payment_type = $_POST['payment_type'];
                $payment_status = $_POST['payment_status'];
                $payment_gross = $_POST['payment_gross'];
                $payment_fee = $_POST['payment_fee'];
                $settle_amount = $_POST['settle_amount'];
                $memo = $_POST['memo'];
                $payer_email = $_POST['payer_email'];
                $txn_type = $_POST['txn_type'];
                $payer_status = $_POST['payer_status'];
                $address_street = $_POST['address_street'];
                $address_city = $_POST['address_city'];
                $address_state = $_POST['address_state'];
                $address_zip = $_POST['address_zip'];
                $address_country = $_POST['address_country'];
                $address_status = $_POST['address_status'];
                $item_number = $_POST['item_number'];
                $tax = $_POST['tax'];
                $option_name1 = $_POST['option_name1'];
                $option_selection1 = $_POST['option_selection1'];
                $option_name2 = $_POST['option_name2'];
                $option_selection2 = $_POST['option_selection2'];
                $for_auction = $_POST['for_auction'];
                $invoice = $_POST['invoice'];
                $custom = $_POST['custom'];
                $notify_version = $_POST['notify_version'];
                $verify_sign = $_POST['verify_sign'];
                $payer_business_name = $_POST['payer_business_name'];
                $payer_id =$_POST['payer_id'];
                $mc_currency = $_POST['mc_currency'];
                $mc_fee = $_POST['mc_fee'];
                $exchange_rate = $_POST['exchange_rate'];
                $settle_currency  = $_POST['settle_currency'];
                $parent_txn_id  = $_POST['parent_txn_id'];
                // Email headers
                $mailheaders  = "From: Website - product-delivery@Website.com \n";
                $mailheaders .= "Reply-To: product-delivery@Website.com \n";
                   

                The code continues from here with my original post. Let me know if I should repost this in a second message.

                  I think you may have made an error somehow when you first moved/copied this file to the new location.

                  Nowhere in the new code does $res get a mention - now we have two variables that, in the code you've shown so far, are expected to have values of some sort but don't.

                  By the way, what is this file called (something.php) ... and how does it sit within the website?

                  P.

                    Note that with the original error -- the "Mail to Joe" was working. Once I corrected it (commenting out the last two lines), the error was gone -- but BOTH emails failed to work.

                    When I copied the files -- I simply moved them from one host to another. The file homes etc. have remained the same.

                    I notice that one page calls another. So now I am wondering if the two pages work together and maybe that's why it looks like I have failed to send you some code. I am going to send you the code for the first page that calls the second page. Maybe that's where the problem starts. Please let me know if you need more.

                    <?php
                    include_once('/home/xxxxx/www/content_publisher/db_fns.php');
                    $conn = db_connect();
                    // read the post from PayPal system and add 'cmd'
                    $req = 'cmd=_notify-synch';
                    
                    $tx_token = $_GET['tx'];
                    
                    //website auth_token
                    //Live Token
                    $auth_token = "xxxxx";
                    
                    //Test Token
                    //$auth_token = "xxxxx";
                    
                    $req .= "&tx=$tx_token&at=$auth_token";
                    
                    // Testing enviroment
                    // post back to PayPal system to validate
                    //$header = "POST https://www.sandbox.paypal.com/cgi-bin/webscr HTTP/1.0\r\n";
                    //$header .= "Content-Type: application/x-www-form-urlencoded\r\n";
                    //$header .= "Content-Length: " . strlen($req) . "\r\n\r\n";
                    //$fp = fsockopen ('www.sandbox.paypal.com', 80, $errno, $errstr, 30);
                    
                    
                    // go live code
                    // post back to PayPal system to validate
                    $header .= "POST /cgi-bin/webscr HTTP/1.0\r\n";
                    $header .= "Content-Type: application/x-www-form-urlencoded\r\n";
                    $header .= "Content-Length: " . strlen($req) . "\r\n\r\n";
                    $fp = fsockopen ('www.paypal.com', 80, $errno, $errstr, 30);
                    
                    
                    
                    // If possible, securely post back to paypal using HTTPS
                    // Your PHP server will need to be SSL enabled
                    // $fp = fsockopen ('ssl://www.sandbox.paypal.com', 443, $errno, $errstr, 30);
                    
                    if (!$fp) {
                    // HTTP ERROR
                    } else {
                    fputs ($fp, $header . $req);
                    // read the body data
                    $res = '';
                    $headerdone = false;
                    while (!feof($fp)) {
                    $line = fgets ($fp, 1024);
                    if (strcmp($line, "\r\n") == 0) {
                    // read the header
                    $headerdone = true;
                    }
                    else if ($headerdone)
                    {
                    // header has been read. now read the contents
                    $res .= $line;
                    }
                    }
                    
                    // parse the data
                    $lines = explode("\n", $res);
                    $keyarray = array();
                    if (strcmp ($lines[0], "SUCCESS") == 0) {
                    for ($i=1; $i<count($lines);$i++){
                    list($key,$val) = explode("=", $lines[$i]);
                    $keyarray[urldecode($key)] = urldecode($val);
                    }
                    // check the payment_status is Completed
                    // check that txn_id has not been previously processed
                    // check that receiver_email is your Primary PayPal email
                    // check that payment_amount/payment_currency are correct
                    // process payment
                    $firstname = $keyarray['first_name'];
                    $lastname = $keyarray['last_name'];
                    $txn_id = $keyarray['txn_id'];
                    for($i = 1; $i<400; $i++){ 
                     if ( ($keyarray['item_name'.$i] != '') && ($keyarray['item_number'.$i] != '') && ($keyarray['quantity'.$i] != '') ){
                     $item_name[$i] = $keyarray['item_name'.$i];
                     $item_number[$i] = $keyarray['item_number'.$i];
                     $quantity[$i] = $keyarray['quantity'.$i];
                     }else{
                     break;
                     }
                    }
                    $payer_email = $keyarray['payer_email'];
                    $amount = $keyarray['mc_gross'];
                    
                    
                    }
                    else if (strcmp ($lines[0], "FAIL") == 0) {
                    // log for manual investigation
                    }
                    
                    }
                    
                    fclose ($fp);
                    
                    ?>
                    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
                    <html>
                    <head>
                     <? /// Get Browser type for CSS
                    
                    // Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) 
                    $agent = getenv("HTTP_USER_AGENT");	  
                    if (preg_match("/MSIE/i", "$agent")){ $browser_result = "MSIE"; $css = "ie_main.css"; $filter = "ie"; }else if (preg_match("/Mozilla/i", "$agent")) { $browser_result = "I.E. 6 "; $css = "mozilla_main.css"; $filter = "mozilla"; } Else { $browser_result = "$agent"; $css = "main.css"; $filter = "mozilla"; } if ($filter == "ie"){ $heightA = "-28"; $heightZa = "170"; $heightB = "30"; $heightC = "0"; $left = "-10"; $RSCD = "60"; $RS = "60"; $VT = "60"; $closeHT = "-67"; }else{ $heightA = "-45"; $heightZa = "160"; $heightB = "30"; $heightC = "20"; $left = "-15"; $RSCD = "30"; $RS = "-100"; $VT = "-50"; $closeHT = "-55"; } $home = "index-new.php"; $close_button = '<span style="float:right; margin-top:'.$closeHT.'px; vertical-align: top"><form><input type=button value="Close Window" class="button_Close" onClick="javascript:window.close();" > </form></span>'; ?> <title>Website Music - Thank You for your Purchase!</title> </head> <body bgcolor="#006600"> <a name="top"></a> <div align="center"> <div id="box"><!-- the entire page --> <!-- Left Panel including logo and menu --> <div id="links"> <div align="center" style="background-color: #ccffcc; width: 100&#37;; height: 160px;"> <img src="images/logo2.jpg" alt="website&nbsp;Music" height="150" width="150" border="0" style=" position: relative; top: 50%; margin-top: -75px; "> </div> <div style="margin-left: 15px; margin-right: 15px; margin-top: 6px;"> <? include_once('/home/xxxxx/public_html/vertical_menu.txt'); ?> </div> </div> <!-- End Left Panel --> <!-- Main Body --> <div id="main" style="width: 575;"> <div id="header" style="width: 575; margin-bottom: 10px;"> <br> <div align="center"> <font color="#990000"> <p class="header">WEBSITE MUSIC</p> <p class="headerB">a world of music, based on the guitar,<br> and on visualinear&#153; tablature</p> <br> </div> </div> <div style="clear: both;"> <div style=" margin_right: 15px; margin_bottom: 5px; padding: 24px; line-height: 1.4em; font-size: 10t; text-align: justify;" class="main"> <div class="Summary_HD">Thank you for your purchase! <?= $close_button ?></div> <h4 class="contact-hdr">Payment Details</h4> <p class="main"> <?= ("<ul><li class='bullet'>Name: $firstname $lastname</li>\n"); echo ("<li class='bullet'>Your Email: $payer_email</li>\n"); echo ("<li class='bullet'>Transaction ID: $txn_id</li></ul>\n"); ?> <!-- Here --> <TABLE cellspacing=0 border=0 width="500"> <? if ($item_name[1] != ''){ ?> <TR class="shoping_cartA">
                    <TD ALIGN="CENTER"><span class="main_Cart"><b>Product</b></span></TD> <TD ALIGN="CENTER"><span class="main_Cart"><b>Ref #</b></span></TD> <TD ALIGN="CENTER"><span class="main_Cart"><b>Quantity</b></span></TD> </TR> <? $j = 1; for($i = 1; $i<$lines; $i++){ if ( ($item_name[$i] != '') && ($item_number[$i] != '') && ($quantity[$i] != '') ){ if ($j >= 3){ $j = 1; } ?> <TR class="shoping_cartA<?= $j ?>"> <TD ALIGN="LEFT"><span class="main_Cart"><?= $item_name[$i] ?></span></TD> <TD ALIGN="CENTER"><span class="main_Cart"><?= $item_number[$i] ?></span></TD> <TD ALIGN="Center"><span class="main_Cart"><center><?= $quantity[$i] ?></center></span></TD> </TR> <? $sqlA = "select id, TEF, PDF, ZIP, product_PDF from stories
                    where ref_no = '".$itemnumber[$i]."' "; $resultA = mysql_query($sqlA, $conn); while ($A = mysql_fetch_array($resultA)) { if ($A['TEF'] != '') $cnt = $cnt + 1; if ($A['PDF'] != '') { $cnt = $cnt + 1; $file_inclusion = "yes"; } if ($A['ZIP'] != '') $cnt = $cnt + 1; if ($A['product_PDF'] != '') $cnt = $cnt + 1; } $j = $j + 1; }else{ break; } } } ?> </table> <!-- Here --> <? echo ("<br><li class='bullet'>Total Amount of your Purchase: $ $amount</li> \n\n"); //echo ("<br><span class='main_Cart'>We are including our Quick Guide in PDF format to assist you. Just click on the link <br>or cut and paste the address into your browser. <a href='http://www.website.com/DL/Quick_Guide.pdf' class='in-body' target='_blank'> Click Here for your Free Copy!</a> </span>\n\n"); ?> </p> <p class="main">Your transaction is complete, and a receipt for your purchase has been emailed to you (<?= $payer_email ?>) along with the information for your download(s).</p> <p class="main">To ensure that you receive our email please whitelist "product-delivery@website.com". This email address is <b><u>only</u></b> used for product delivery purposes, so please do not respond or attempt to correspond with us through product-delivery@website.com.</p> <p class="main">If you have any questions regarding your order, please contact us at <a href="http://www/website.com/contactus.php?purpose=Order Inquiries" class="in-body" target="_self">Order Inquiries - General Assistance</a> or you may want to review our <a href="http://www/website.com/index-new.php?p=contact" class="in-body" target="_self">Contact page by clicking here</a>.</p> <p class="main">If you have an account at <a href='https://www.paypal.com' class="in-body" target="_blank">www.PayPal.com</a>, you can log in and review the details of this transaction.</p> </div> </div> </div> <div style="clear: both;"> <div width="700px" style=" margin-left:0px;"><br> <? include_once('/home/xxxxx/public_html/horizontal_menu.txt'); ?><br> </div> </div> </div> </div> </body> </html> <? include_once('/home/xxxxx/public_html/check_trans.php'); ?>
                      paulnaj;10923062 wrote:

                      So, to be sure, the entirety of the code is what you posted before plus, at the top, just these assignments. No includes, requires or anything else.

                      If that's the case then yes, comment out the last two lines ...

                      mail($notify_email, "INVALID IPN", "$res\n $req\n $headers");
                      }
                      
                      //fclose ($fp);
                      //}

                      ... and see if that works.

                      P

                      I dont think thats the whole issue. It looks like the last brace is the issue

                      if he were to just comment out the brace after the fclose it removes all issues from what I see, of course that is assuming that there isnt some code further up that has an open brace that the last one closes.

                        I had previously commented out the last two lines and the page worked -- with the exception of sending the emails. The two emails are not being sent. After I read your post I ried commenting out the close bracked on line 198. The script seemed to work (the same as when I commented out the last two lines), but the emails are still not going out.

                        With the original error, one email was working (mail to joe) and one was not. I am really confused on what to do next.

                          tulip88;10923105 wrote:

                          I had previously commented out the last two lines and the page worked -- with the exception of sending the emails. The two emails are not being sent. After I read your post I ried commenting out the close bracked on line 198. The script seemed to work (the same as when I commented out the last two lines), but the emails are still not going out.

                          With the original error, one email was working (mail to joe) and one was not. I am really confused on what to do next.

                          Another thing I noticed is you have 2 mail() calls that are missing commas between the message and headers.

                            Write a Reply...