Hello i need some help with my script it dosent auto give points to players what can be wrong?
PHP:
<?PHP
error_reporting(0);
require("config.php");
$mysqli = new mysqli($config['database']['host'], $config['database']['login'], $config['database']['password'], $config['database']['database']);
?>
<p>
<b>1.</b> When you donate money to our project <?= $config['server_name'] ?>, you understand that a donation is a gift and that you cannot demand us to refund your money. The money we receive from donations will be used to improve our server.<br /><br />
<b>2.</b> If you, for any reason, would refund your money, we reserve the rights to ban or delete your account without any further notice.<br /><br />
<b>3.</b> Please save the PIN-code you receive after the transaction incase anything would go wrong when you pick a gift. Otherwise we can not really help you, the PIN-code is pretty much the only proof that you have donated money to our project.<br /><br />
<b>4.</b> As a thanks for supporting our project <?= $config['server_name'] ?> with money, you may request a gift in our gameservers. Based upon how much you donate to us, you can request a better gift. The available gifts can be found here.<br /><br />
<b>5.</b> We have the rights to modify any of the donation items. We have the rights to change the prices whenever we want. We have the rights to reset the server whenever we want. We have the rights to change the terms and agreements whenever we want.<br /><br />
<b>6.</b> While using Paypal I want you to send a Email to [email protected] With The Characters name and the transcation ID And i will put the points in when i recived the Email! IF you havent got your points yet Please post at the forum -> donation With your transaction ID and char name and i will add the points that way!<br /><br />
</p>
<input type="submit" value="I accept!" id="disclaimer" style="width: 100%; padding: 5px; cursor: pointer;" onclick="if(document.getElementById('payment_info').style.display == 'none') { document.getElementById('payment_info').style.display = ''; this.value = 'I don\'t accept!'} else { document.getElementById('payment_info').style.display = 'none'; this.value = 'I accept!'; }" />
<div style="display: none;" id="payment_info">
<input type="submit" value="Choose Payment Method" id="payment_info" style="width: 100%; padding: 5px; cursor: pointer;" onclick="if(document.getElementById('method_paypal').style.display == 'none') { document.getElementById('method_paypal').style.display = '';} else { document.getElementById('method_paypal').style.display = 'none';}" />
<input type="submit" value="DaoPay - CALL/SMS" id="method_daopay" style="width: 100%; padding: 5px; cursor: pointer; display: none;"onclick="if(document.getElementById('product_sell').style.display == 'none') { document.getElementById('product_sell').style.display = '';} else { document.getElementById('product_sell').style.display = 'none';}" />
<table id="product_sell" style="display: none;" border="0px" cellspacing="1px" cellpadding="4px" width="100%">
<tr bgcolor="#e6eae8">
<td>Product</td>
<td>Points</td>
<td>Cost</td>
<td>Link</td>
</tr>
</table>
<input type="submit" value="PayPal - Credit Card" id="method_paypal" style="width: 100%; padding: 5px; cursor: pointer; display: none;"onclick="if(document.getElementById('product_sell_paypal').style.display == 'none') { document.getElementById('product_sell_paypal').style.display = '';} else { document.getElementById('product_sell_paypal').style.display = 'none';}" />
<?PHP
$paypal['currency'] = "USD"; // SEK, USD, PLN, EUR .. check more at paypal.com
$paypal['email'] = ("[email protected]");
$productp[1]['points'] = 500;
$productp[1]['cost'] = 1;
$productp[2]['points'] = 1100;
$productp[2]['cost'] = 10;
$productp[3]['points'] = 2500;
$productp[3]['cost'] = 20;
$productp[4]['points'] = 7500;
$productp[4]['cost'] = 50;
$productp[5]['points'] = 20000;
$productp[5]['cost'] = 100;
echo'<table id="product_sell_paypal" style="display: none;" border="0px" cellspacing="1px" cellpadding="4px" width="100%">';
if($_SESSION['logged']):
echo '<tr align="center" bgcolor="#97d0fc"><th>Points</th><th>Cost</th><th>Buy</th></tr>';
$i = 1;
foreach($productp as $_product):
$color = ($i % 2 ? '#c6e4fb' : '#fffff');
$i++;
echo '<tr align="center" bgcolor="'.$color.'"><td>+'.$_product['points'].'</td><td>'.$_product['cost'].$paypal['currency'].'</td>';
echo '<td>';
echo '
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_donations">
<input type="hidden" name="business" value="'.$paypal['email'].'">
<input type="hidden" name="lc" value="GB">
<input type="hidden" name="item_name" value="'.$_product['points'].'">
<input type="hidden" name="custom" value="'.$_SESSION['name'].'">
<input type="hidden" name="item_number" value="1">
<input type="hidden" name="amount" value="'.$_product['cost'].'.0">
<input type="hidden" name="currency_code" value="'.$paypal['currency'].'">
<input type="hidden" name="no_note" value="0">
<input type="hidden" name="no_shipping" value="0">
<input type="hidden" name="notify_url" value="'.$config['website'].'/paypal/ipn.php">
<input type="hidden" name="return" value="'.$config['website'].'/index.php/p/v/shop">
<input type="hidden" name="rm" value="0">
<input type="hidden" name="bn" value="PP-DonationsBF:btn_donateCC_LG_global.gif:NonHosted"><br />
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online.">
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
';