EDIT:
Na wat aanpassen is de error eindelijk weg, alles word in de database opgeslagen, MAAR
Mijn account is id 1 en hij gaf me de code HQG506.
Nu staat er echter id 0 en code 0
dat moet id 1 en code HQG506 zijn.
is het de sql of het script?
SQL
id = int 11
code = int 11
Het stukje script:
PHP
<?php
}
/**
* This function will validate the payment
*
*/
# ?action=vtrxid= 'trxid'
if ( isset ( $_GET['ShoppingCartID'] ) ) {
# Init the class
$oWallie = new TargetPayWallie ( $iRtlo );
# Test mode? 1 = test mode, 0 = normal
$iTest = 0;
# Once, only validate the payment once?
$iOnce = 1;
if ( $oWallie->validatePayment ( $_GET['ShoppingCartID'], $iOnce, $iTest ) == true ) {
$unieke_code = chr(rand(65,90)).chr(rand(65,90)).chr(rand(65,90)).rand(0,9).rand(0,9).rand(0,9);
$id = mysql_result(mysql_query("SELECT id FROM gebruikers WHERE id = ".$_SESSION['gebruiker']),0);
mysql_query("INSERT INTO bestelling (id, orderid) VALUES ('".$ID."', '".$unieke_code."')");
print "Betaling verwerkt, jouw order id is: "; ?> <br><br> <?
echo $unieke_code; ?><br><br> <?
print "Ga naar je account beheer om je bestelling te kunnen zien!:"; ?> <br><br> <?
}
else {
echo 'De betaling was (nog) niet geslaagd';
}
}
?>
Toon Meer
de id en orderid word nu dus niet in de database gegooid
Groetjes,