well i wanna add a more arrays to my ipn.php gesior script so could someone help me with it ?
REp++
second is about the htm im trying to add a login req so ppl dont need to write the account anymore:
REp++
PHP:
<?
$mysql_host = 'localhost'; //Leave at localhost
$mysql_user = 'xxxx'; //DB User
$mysql_pass = 'xxxx'; //DB Pass
$mysql_db = 'xxxx'; //DB Name
$file = 'paypal.log'; //Paypal Log Name will be placed in the same location as your ipn.php file
$custom = stripslashes(ucwords(strtolower(trim($_REQUEST['custom']))));
$receiver_email = $_REQUEST['receiver_email'];
$payment_status = $_REQUEST['payment_status'];
$mc_gross = $_REQUEST['mc_gross'];
$payer_email = $_REQUEST['payer_email'];
$somecode = "'$custom' '$payer_email' '$mc_gross'";
// connect db
$db = mysql_connect($mysql_host, $mysql_user, $mysql_pass);
mysql_select_db($mysql_db, $db);
if ($payment_status == "Completed" & $receiver_email == "xxxxxxxxxxx" & $mc_gross == "10.00") {
$query = "SELECT premium_points FROM accounts WHERE accounts.name = '$custom'";
$result = mysql_query($query);
$prem = mysql_fetch_array($result);
$points = $prem['premium_points'] + 220;
// $points = mysql_query($prem)
$qry2 = "UPDATE accounts SET premium_points = '$points' WHERE accounts.name = '$custom'";
// Log Paypal Transaction
$hak = fopen($file, "a");
fwrite($hak, $somecode);
fclose($hak);
$result2 = mysql_query($qry2);
}
else
{
echo("Error.");
}
?>
second is about the htm im trying to add a login req so ppl dont need to write the account anymore:
PHP:
<b>PayPal Shop System.</b><br><br>
The shop costs:<ul><li> 10 EUR (for 200 points) + 20 bonus</li><br>
<b>Here are the steps you need to make:</b> <br>
1. A PayPal account with a required balance [10] or a creditcard. <br>
2. Fill in your account number. <br>
3. Click on the Buy Now button or your creditcard brand. <br>
4. Make a transaction. <br>
5. After the transaction 200 + 20 points will be automatically added to your account. <br>
6. Go to Item shop and use your points <br> <br> <br> </b>
<span style="color:red">If you recall the money, and your premiumpoints can't be recalled your account will be deleted</span>
<span style="color:green">also DONT forget to put ur account number before donate.</span>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="G5NLVAD4CMH4N">
<b>Account name/login:</b> <input type="text" name="custom" value="">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
<input type="hidden" name="button_subtype" value="products">
<input type="hidden" name="currency_code" value="EUR">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="currency_code" value="EUR">
<input type="hidden" name="notify_url" value="http://xxxxx.no-ip.xxxx/paypal/ipn/ipn.php">
<input type="hidden" name="return" value="http://xxxxxx.no-ip.xxx">
<input type="hidden" name="rm" value="0">
<input type="hidden" name="bn" value="PP-BuyNowBF:btn_buynowCC_LG.gif:NonHostedGuest">
</form>
</form>