-2

this is the error message i am getting

Parse error: syntax error, unexpected end of file in C:\xampp\htdocs\projectwxyz\include_files\payment_download.class.php on line 96 Can some one help me out

if ($query) {

    $message_reciever='jtime@yahoo.com';
    $admin_message_subject = 'pect Payment Information';
    $admin_message = "<div style='background-color:#eeeeee;padding:2%;'>
            <div style='margin-left:10%; margin-right:10%; text-align:center; background-color:white;'>
            <div style='background-color:#9a3bf2; padding-bottom:2%;padding-top:2%;'><img src=\"repertory/img/mainlogo.jpg\" width=\"40px\" height=\"40px\"></div>
            <p><strong><h1>Hi, $message_reciever</h1></strong></p>
                <hr>
            <p>Your payment information has been successfully submited to <a href=\"http://www.pject.com\">pject</a></p>
            <p>Here are your payment information</p>
            <p>Depositors Name: $depositors_name</p>
            <p>Transaction id: $transaction_id</p>
            <p>Bank Paid To: $bank_name</p>
            <p>Email: $email</p>
            <p>Phone Number: $phone</p>
            <p>Department: $department</p>
            <p>Project Material Code: $material_code</p>

            <p>Your download code will be sent to you 20 - 45mins after your payment is confirmed.</p>
            <p>We are more intrested in your Academic success.</p><br>
            <p><strong>Thanks for using our platform. We are more intrested in your Academic success. Let your friends know about Projectwxyz by clicking the facebook share button on our page.</strong></p>
            <a href=\"http://www.pect.com\">Continue.</a>
            </div>
            </div>";

    $message_body = <<<EOD
    $admin_message
            EOD;

    $message_header = "From: no-reply@pect.com\n";
    $message_header .= "MIME-Version: 1.0\n";
    $message_header .="Content-type: text/html; charset=iso-8859-1 \n";
    @mail($message_reciever, $admin_message_subject , $message_body, $message_header);

    echo '<div class="success_message"> Your payment information was sent successfully. A download code will be sent to your email 20 - 45mins after your payment is confirmed.</div>';

}else{

    echo '<div class="danger_message"> An error occurred. Try again later.</div>';

}
Peyman Mohamadpour
  • 17,954
  • 24
  • 89
  • 100
Godstime John
  • 253
  • 3
  • 8

1 Answers1

0

There should be no whitespace before the last EOD;

<?php

if ($query) {

    $message_reciever      = 'jtime@yahoo.com';
    $admin_message_subject = 'pect Payment Information';
    $admin_message         = "<div style='background-color:#eeeeee;padding:2%;'>
            <div style='margin-left:10%; margin-right:10%; text-align:center; background-color:white;'>
            <div style='background-color:#9a3bf2; padding-bottom:2%;padding-top:2%;'><img src=\"repertory/img/mainlogo.jpg\" width=\"40px\" height=\"40px\"></div>
            <p><strong><h1>Hi, $message_reciever</h1></strong></p>
                <hr>
            <p>Your payment information has been successfully submited to <a href=\"http://www.pject.com\">pject</a></p>
            <p>Here are your payment information</p>
            <p>Depositors Name: $depositors_name</p>
            <p>Transaction id: $transaction_id</p>
            <p>Bank Paid To: $bank_name</p>
            <p>Email: $email</p>
            <p>Phone Number: $phone</p>
            <p>Department: $department</p>
            <p>Project Material Code: $material_code</p>

            <p>Your download code will be sent to you 20 - 45mins after your payment is confirmed.</p>
            <p>We are more intrested in your Academic success.</p><br>
            <p><strong>Thanks for using our platform. We are more intrested in your Academic success. Let your friends know about Projectwxyz by clicking the facebook share button on our page.</strong></p>
            <a href=\"http://www.pect.com\">Continue.</a>
            </div>
            </div>";

    $message_body = <<<EOD
    $admin_message
EOD;



    $message_header = "From: no-reply@pect.com\n";
    $message_header .= "MIME-Version: 1.0\n";
    $message_header .= "Content-type: text/html; charset=iso-8859-1 \n";
    @mail($message_reciever, $admin_message_subject, $message_body, $message_header);

    echo '<div class="success_message"> Your payment information was sent successfully. A download code will be sent to your email 20 - 45mins after your payment is confirmed.</div>';

} else {

    echo '<div class="danger_message"> An error occurred. Try again later.</div>';

}
Masivuye Cokile
  • 4,754
  • 3
  • 19
  • 34