I'm trying to intergrate a cgi affiliate tracking system into a php
website. When someone pays using PayPal it's supposed to direct them to one
page if the payment is a success or another if payment failed. This is the
code:
if($action == order && $order_n != "")
{
include "engine/card_process.pml";
if($payment_status == success)
{
$page = payment_success;
}
else
{
$page = payment_failed;
}
}
I'm trying to insert code into this process that will credit the affiliate
the correct amount if the process is a success. This is the code that's
supposed to be inserted to credit affiliates:
<img src="http://www.yoursite.com/cgi-bin/affiliates/sale.cgi?payment=
$amount" border=0>
I tried inserting this before the line "$page = payment_success;" in
various forms, but I either get errors, or the affiliate isn't credited, or
both. I managed to get the code to credit affiliates correctly, by
inserting this:
include "<img src='http://www.yoursite.com/cgi-bin/affiliates/sale.cgi?
payment=$amount' border=0>";
but it also gives me errors:
Warning: main(): failed to open stream: No such file or directory in
/home/httpd/vhosts/yoursite.com/httpdocs/index.php on line 18
Warning: main(): Failed opening '<img src='http://www.yoursite.com/cgi-
bin/affiliates/sale.cgi?payment=0.01' border=0>' for inclusion
(include_path='.:/usr/share/pear') in
/home/httpd/vhosts/yoursite.com/httpdocs/index.php on line 18
Warning: session_start(): Cannot send session cookie - headers already sent
by (output started at
/home/httpd/vhosts/yoursite.com/httpdocs/index.php:18) in
/home/httpd/vhosts/yoursite.com/httpdocs/index.php on line 29
Warning: session_start(): Cannot send session cache limiter - headers
already sent (output started at
/home/httpd/vhosts/yoursite.com/httpdocs/index.php:18) in
/home/httpd/vhosts/yoursite.com/httpdocs/index.php on line 29
Warning: Cannot modify header information - headers already sent by (output
started at /home/httpd/vhosts/yoursite.com/httpdocs/index.php:18) in
/home/httpd/vhosts/yoursite.com/httpdocs/index.php on line 69
Line 18 is the inserted code, line 29 is:
session_start();
Line 69 is:
setcookie("current_page"' $page);
If you can help me I would appreciate it. I really don't have a clue about
what I'm doing. I'm just guessing. Also, the email address is valid.
Address harvesters are programmed to ignore email addresses that contain
the word "fake".