Here’s the front end w/o a bunch of extraneous stuff (the entire 800+ lines are available is needed for any reason)
[php] // /RGSTRTN_06_snip2.php
$counter = file_get_contents($_SERVER['DOCUMENT_ROOT'] .'/auxlib/usit2013/counter.txt');
$counter++; file_put_contents("counter.txt", $counter);
include_once ($_SERVER['DOCUMENT_ROOT'] . '/.../cnnct2mysql.php');
include_once ($_SERVER{'DOCUMENT_ROOT'} . '/.../usit2013/SMTP4PHP.php');
error_reporting (E_ALL ^ E_NOTICE);
$time_stamp = date('l dS \of F Y h:i:s A ');
echo $counter, ' RGSTRTN_06.php ' . date('l dS \of F Y h:i:s A '),'<p>';
?>
headers
<?PHP
$fp = fsockopen ('www.sandbox.paypal.com', 80, $errno, $errstr, 30);
//////////////////////////////////////////////////////////////////////////
// A. Assign self-posted REGISTRATION data to local variables. //
//////////////////////////////////////////////////////////////////////////
echo "L.65 ", $tried ? " tried is set <p>" : " tried is not set <p>";
if($tried == true) //Set to yes when registration form is submitted (at end of this script L. 778)
{
$invoiceNo = $_POST[‘invoiceNo’];
$amount = $_POST[‘amount’];
$item_name = $_POST[‘item_name’];
$email = $_POST[‘email’];
// abbreviated list of client registration data
}
//////////////////////////////////////////////////////////////////////////
// B. Prepare Country- & State-select tags (Courtesy David Kirol) //
// (array processing courtesy w@tt, PHP Help Forum) //
//////////////////////////////////////////////////////////////////////////
$a = Array();
$a[" "] = '';
$fh = fopen("http://www.u-sit.net/.../kvpisow2.txt", "r");
while(($buffer = fgets($fh, 4096)) !== false)
{
$kvp = preg_split ("/[\s,]+/", $buffer);
$index = array_shift($kvp); // shift the first element to use as array index
$results[$index] = implode(" ", $kvp);
}
fclose ($fh);
//////////////////// ++++++++++++++ End of Country prep +++++++++++++ ////////////////
$b = Array();
$b[" "] = '';
$gh = fopen($_SERVER{'DOCUMENT_ROOT'} . '/.../StateCodes.txt', "r");
$results = array();
while (($buffer = fgets($gh)) !== false)
{
$ens = preg_split ("/[\s,]+/", $buffer); // Split buffer on any combination of spaces or commas.
$index = array_shift($ens);
$results[$index] = implode(" ", $ens);
}
fclose ($gh);
/////////////// ++++++++++ End Country- & State-array preparations. +++++++++++++++++++++ //
$tried = $_POST['tried'] == 'yes';
/*
IF ($tried) {
*/
//////////////////////////////////////////////////////////////////////////////////////////
// C. Echo self-posted data for customer’s information w/o allowing corrections. //
//////////////////////////////////////////////////////////////////////////////////////////
[/php]