<?php
// The variable below is the only one you should change.
// Create copies of this file for each different reward ie. check2.php for �5, check3.php for �4 etc
$payment = "0.44";
// Do not edit anything below this line
include "affconfig.php";
$ref = $HTTP_COOKIE_VARS["ref"];
if ($ref == '')
{
if($debugMessage)
echo "<br><font color=#ff0000>PostAffiliate Debug Msg: No referrer found in cookie, trying to use sessions.</font><br>";
$ref = $_SESSION["ref"];
if($ref == '' && $debugMessage)
echo "<br><font color=#ff0000>PostAffiliate Debug Msg: No referrer found in session.</font><br>";
}
if ($ref != '')
{
echo "<br><font color=#ff0000>: Referrer '$ref' found, registering sale.</font><br>";
mysql_connect($server, $db_user, $db_pass)
or die ("Database CONNECT Error (line 32)");
mysql_db_query($database, "INSERT INTO sales VALUES ('$ref', '$clientdate', '$clienttime', '$clientbrowser', '$clientip', '$payment')")
or die("Database INSERT Error (line 34)");
}
?>
en dit de eerste regeld van orderbevestigings script
<?php
include "header.php"; // de header (logo/menu/etc)
include "tjek.php"; // controlle payment
// Toevoegen
if(isset( $_POST['ADD']) && ereg('^[1-9][0-9]*$', $_POST['aantal']))
?>
<?php
// The variable below is the only one you should change.
// Create copies of this file for each different reward ie. check2.php for �5, check3.php for �4 etc
$payment="0.44";
// Do not edit anything below this line
include"affconfig.php";
$ref=$HTTP_COOKIE_VARS["ref"];
if($ref=='')
{
if($debugMessage)
echo"<br><font color=#ff0000>PostAffiliate Debug Msg: No referrer found in cookie, trying to use sessions.</font><br>";
$ref=$_SESSION["ref"];
if($ref==''&&$debugMessage)
echo"<br><font color=#ff0000>PostAffiliate Debug Msg: No referrer found in session.</font><br>";
Op regel 21 echo je het aantal resultaten, wat komt daar uit?
Als daar 2 uit komt gaat er bij het ophalen uit de database iets mis (want hij hoort er maar 1 op te halen) en als er 1 uit komt gaat er dus iets fout in je php code.