All pastes #592756 Raw Edit

Haris

public text v1 · immutable
#592756 ·published 2007-06-27 22:17 UTC
rendered paste body
if(isset($paypal['business']))
{
    $orderid = $_GET['orderid'];

	//for debugging - listing variables sent to me
	//listback();
	
	//log successful transaction to file or database

    // Get values from pptransactions table
    $record = mysql_query ("SELECT siteid, months from pptransactions where orderid=$orderid");
	$result = mysql_fetch_array ($record);
	
	// Put values to toplist_members table
	$confirmed_order = "INSERT into toplist_members (`siteid`,`months`) VALUES ({$result['siteid']},{$result['months']})";
	$result = mysql_query ( $confirmed_order );
	
	// Delete temporary entry from pptransactions table
	$delete_record = mysql_query ( "DELETE from pptransactions where orderid=$orderid" );
	
	// Redirect to some .. thankyou page
	//header (Location: "http://www.gtop100.com/paypal_callback.php");}
else
{
	die('This page is not directly accessible');
}
?>