Jump to content

[AJUDA] Transformar registo com pagamento, para registo sem pagamento!


Venklan
 Share

Recommended Posts

Boas!

Eu tenho esta página de registo, só que o problema é que quando vamos para efectuar o registo, somos obrigados a pagar um "x" por paypal, e só depois é que nos abilita o acesso ao registo.

E eu queria saber como é que faço para que apareça logo para fazer o registo, e não tenha nenhum contacto com a paypal.

Agradeço qualquer ajuda  🙂

Código:

<?php

include 'files/header.php';
include 'files/myphp.php';
if (!$_SESSION['grabbed']){
$f = file_get_contents('uniquecount.txt');
file_put_contents('uniquecount.txt', ($f+1));
$_SESSION['grabbed'] = 'ty';
}

if ($_GET['action'] == 'store'){
if (!$_POST['trial'])
	$check = mysql_query("SELECT amount,accountcreated FROM payments WHERE transaction='".mysql_real_escape_string($_POST['txid'])."' LIMIT 1") or die('Error: '.mysql_error());
else
	$check = mysql_query("SELECT amount,accountcreated FROM payments WHERE email='".mysql_real_escape_string($_POST['email'])."' ORDER BY accountcreated ASC LIMIT 1") or die('Error: '.mysql_error());
$c = @mysql_fetch_array($check);
if (!@mysql_numrows($check)){
	echo 'Our records to do not show a transaction associated with the provided information.  If you have previously submitted payment for your account, please <a href="/contact.php">contact us</a> and provide your transaction id.  If you have not, please proceed to our <a href="/createaccount.php">Account Creation</a> page.';
	include 'files/footer.php';
	exit;
}
if ($c['accountcreated'] != '0'){
	echo 'Our records indicate you have already created an account with this transaction!!';
	include 'files/footer.php';
	exit;
}

$username = trim($_POST['username']);
if (strlen($username) < 5 || strlen($username) > 25)
	$errors .= 'Usernames must be between 5 and 25 characters!<br />';
else if (ereg('[^A-Za-z0-9]', $username))
	$errors .= 'Usernames can only contain alphanumeric characters!<br />';
if ($_POST['pass1'] != $_POST['pass2'])
	$errors .= 'Passwords do not match!<br />';
else if (strlen($_POST['pass1']) < 5 || strlen($_POST['pass1']) > 25)
	$errors .= 'Passwords must be between 5 and 25 characters!<br />';

if (!$errors){
	$check = mysql_query("SELECT id FROM users WHERE username='".mysql_real_escape_string($username)."' LIMIT 1");
	if (@mysql_numrows($check))
		$errors .= 'Username is already in use!<br />';
}

if (!$errors){
	if ($c['amount'] == '0.99'){
		$space = 5000;
		$bandwidth = 50000;
	}
	else if ($c['amount'] == '10.00' || $c['amount'] == 10){
		$space = 25000;
		$bandwidth = 250000;
	}
	else{
		$space = 10000;
		$bandwidth = 100000;
	}
	if ($_POST['trial']){
		$check = mysql_query("SELECT transaction FROM payments WHERE email='".mysql_real_escape_string($_POST['email'])."' LIMIT 1");
		$transaction = @mysql_result($check, 0, 'transaction');
	}
	else
		$transaction = $_POST['txid'];

	mysql_query("INSERT INTO users (username,password,email,signupdate,paidtil,space,bandwidth,transaction) VALUES('".mysql_real_escape_string($username)."', '".md5($_POST['pass1'])."', '".mysql_real_escape_string($_POST['email'])."', ".time().", ".(time()+60*60*30).", '".intval($space)."', '".intval($bandwidth)."', '".mysql_real_escape_string($transaction)."')") or die('Error: '.mysql_error());
	mysql_query("UPDATE payments SET accountcreated='1' WHERE transaction='".mysql_real_escape_string($transaction)."' LIMIT 1");
	echo '<b>Account Creation Successful!</b><br />Continue to our <a href="/login.php">login</a> page and get started using your account!<br />';
	include 'files/footer.php';
	exit;
}
echo '<div style="color: red;"><b>Error(s):</b> '.$errors.'<br /></div>';
echo '<form method="post" action="createaccount.php?action=store"><input type="hidden" name="txid" value="'.$_POST['txid'].'" /><table>
	<tr><td><b>Username</b></td><td><input type="text" name="username" value="'.$_POST['username'].'" /></td></tr>
	<tr><td><b>Password</b></td><td><input type="password" name="pass1" /></td></tr>
	<tr valign="top"><td><b>Password</b><br />(retype)</td><td><input type="password" name="pass2" /</td></tr>';
if ($_POST['trial'])
	echo '<tr valign="top"><td><b>Paypal Email Address</b><input type="hidden" name="trial" value="true" /><br /><span style="font-size: 10px;">(MUST be the same<br /> as used for payment!)</span></td><td><input type="text" name="email" /></td></tr>';
echo '	<tr><td></td><td><input type="submit" value="Create Account" /></td></tr>
	</table></form>';
exit;
}

if ($_GET['return']){
// read the post from PayPal system and add 'cmd'
$req = 'cmd=_notify-validate';

foreach ($_REQUEST as $key => $value) {
	$value = urlencode(stripslashes($value));
	$req .= "&$key=$value";
}

// post back to PayPal system to validate
$header .= "POST /cgi-bin/webscr HTTP/1.0\r\n";
$header .= "Content-Type: application/x-www-form-urlencoded\r\n";
$header .= "Content-Length: " . strlen($req) . "\r\n\r\n";
$fp = fsockopen ('www.paypal.com', 80, $errno, $errstr, 30);

// assign posted variables to local variables
$item_name = $_REQUEST['item_name'];
$item_number = $_REQUEST['item_number'];
$payment_status = $_REQUEST['payment_status'];
//$payment_amount = $_REQUEST['mc_gross'];
$payment_amount = $_REQUEST['amt'];
$payment_currency = $_REQUEST['mc_currency'];
$txn_id = $_REQUEST['tx'];
$receiver_email = $_REQUEST['receiver_email'];
$payer_email = $_REQUEST['payer_email'];

if (!$fp) {
	// HTTP ERROR
} else {
	fputs ($fp, $header . $req);
	while (!feof($fp)) {
		$res = fgets ($fp, 1024);
		/*if (strcmp ($res, "INVALID") == 0) {
			// log for manual investigation
			echo 'Uh-oh, our servers encountered a problem, please <a href="/contact.php">Contact Us!</a>';
			include 'files/footer.php';
			exit;
		}
		if (strcmp ($res, "VERIFIED") == 0)*/{
			// check the payment_status is Completed
			// check that txn_id has not been previously processed
			// check that receiver_email is your Primary PayPal email
			// check that payment_amount/payment_currency are correct
			// process payment*/
/*die('receiver: email: '.$_GET['receiver_email']);
			if ($receiver_email == 'jitenagrawal@yahoo.com'){*/
			if ($txn_id){
				$goodpayment = true;
			}
		}

	}
fclose ($fp);
}

if ($goodpayment || $_GET['trial']){
	echo '<div style="width: 100%;" align="center"><b>Payment Succesful!  Complete the form to setup your account:</b><br />';
	if ($goodpayment){
		$msg = 'Transasction ID '.$txn_id.' has just signed up for an account totalling '.$payment_amount;
			//mail('jitenagrawal@yahoo.com', 'File Dropper Signup', $msg, 'From: webmaster@filedropper.com');
			//mail('david@codeworksplus.com', 'File Dropper Signup', $msg, "From: webmaster@filedropper.com\r\n", "-fwebmaster@filedropper.com");
		mail('webmaster@filedropper.com', 'FileDropper Signup', $msg, 'From: webmaster@filedropper.com'."\r\n", '-f webmaster@filedropper.com');
		$check = mysql_query("SELECT accountcreated,transaction FROM payments WHERE transaction='".mysql_real_escape_string($txn_id)."' LIMIT 1");
		$c = @mysql_fetch_array($check);
		if (@mysql_numrows($check) && $c['accountcreated'] == '1'){
			echo 'Our records indicate you have already signed up for an account already with this payment!';
			include 'files/footer.php';
			exit;
		}
		else if ($c['accountcreated'] != '1')
			mysql_query("INSERT INTO payments (email,ip,transaction,date,amount) VALUES('".mysql_real_escape_string($payer_email)."', '".mysql_real_escape_string($_SERVER['REMOTE_ADDR'])."', '".mysql_real_escape_string($txn_id)."', ".time().", '".mysql_real_escape_string($payment_amount)."')") or die('Error: '.mysql_error());
	}
	echo '<form method="post" action="createaccount.php?action=store"><input type="hidden" name="txid" value="'.$txn_id.'" /><table>
		<tr><td><b>Username</b></td><td><input type="text" name="username" /></td></tr>
		<tr><td><b>Password</b></td><td><input type="password" name="pass1" /></td></tr>
		<tr valign="top"><td><b>Password</b><br />(retype)</td><td><input type="password" name="pass2" /></td></tr>';
	if ($_GET['trial'])
		echo '<tr valign="top"><td><b>Paypal Email Address</b><input type="hidden" name="trial" value="true" /><br /><span style="font-size: 10px;">(MUST be the same<br /> as used for payment!)</span></td><td><input type="text" name="email" /></td></tr>';
	echo '<tr><td></td><td><input type="submit" value="Create Account" /></td></tr>
		</table></form>';
	echo '</div>';
	include 'files/footer.php';
	exit;
}
}

$paypal_identity = 'yhPB1jmzwFiZuddrVBaKUWvkw87VuiqbxMTpQvh0FuYXnA-6APG45chVSX8';

$block1 = '<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="image" src="http://www.filedropper.com/images/block1.jpg" 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">
<input type="hidden" name="cmd" value="_xclick-subscriptions">
<input type="hidden" name="business" value="jitenagrawal@yahoo.com">
<input type="hidden" name="item_name" value="7 Day Free Trial">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="return" value="http://www.filedropper.com/createaccount.php?return=paypal&trial=true">
<input type="hidden" name="notify_url" value="http://www.filedropper.com/trials.php">
<input type="hidden" name="cancel_return" value="http://www.filedropper.com/createaccount.php">
<input type="hidden" name="logo_custom" value="http://www.filedropper.com/images/block1.jpg">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="bn" value="PP-SubscriptionsBF">
<input type="hidden" name="a1" value="0.00">
<input type="hidden" name="p1" value="7">
<input type="hidden" name="t1" value="D">
<input type="hidden" name="a3" value="5.00">
<input type="hidden" name="p3" value="1">
<input type="hidden" name="t3" value="M">
<input type="hidden" name="src" value="1">
<input type="hidden" name="sra" value="1">
</form>

';
$block2 = '<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="image" src="http://www.filedropper.com/images/block2.jpg" 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">
<input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIH8QYJKoZIhvcNAQcEoIIH4jCCB94CAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYBecMo10ReBVjOBg24wNaSuiLgdP7FHvocIHxS+3FihSzx8OeFndaE78CKIVR3V3ViPJFaN8arIE/NSokrm0u6KXdx4MK9LlobsC5P0nI0EGT4+g2Pz3vc2wZfXaW/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EKHrgzuQk8z36us0AsaHPszqjQlnUqznoBCGUwpLOIq5Yb3vWNcjZaapKq7OXsv1o+1d98VQKwFywL4df0gn4s3QacBW/41dhD/IBodrfGhouIPvsDPuxSHl9GxYLskdgXjtFzuKwPTJAd/OWprlcf4ZGpWfIj1La6iCU4L-----END PKCS7-----
">
</form>
';
$block3 = '<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="image" src="http://www.filedropper.com/images/block3.jpg" 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">
<input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIH6QYJKoZIhvcNAQcEoIIH2jCCB9YCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYBCybu4HtpGGdXtwcBNYV+Tz/2bLcpVWcKpyPW2H5/+V95rjYu+gyDZn2CzTYLRDTjqTDJ6ZJ+6LEo9eFFqtfOVDh5ULLwejzq6AczD14y/8sy/fr/PLWsyEXcbaw6EiNfFA0OtxCMFF9hj7/Z09wn1mblyWB1zv87d4dhNxLsyijELMAkGBSsOAwIaBQAwggFlBgkqhkiG9w0BBwEwFAYIKoZIhvcNAwcECDlgh64wcwXLgIIBQOhzs4i+T6mN4VJbZ0DQu+jbD6ptx9txS6mK72a/zEKudPJ/eBL6ipDHX7WYFNBrZL3FYIB6bHCRVbMF0+LxW7YvOYFDWJGQ3dvL4LOUxvQMbKb8GN2VG4Edn/IIiQNyBZwtyWteTJq7xMSsF4HhZo1E8m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BkTCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb22CAQAwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOBgQCBXzpWmoBa5e9fo6ujionW1hUhPkOBakTr3YCDjbYfvJEiv/2P+IobhOGJr85+XHhN0v4gUkEDI8r2/rNk1m0GA8HKddvTjyGw/XqXa+LSTlDYkqI8OwR8GEYj4efEtcRpRYBxV8KxAW93YDWzFGvruKnnLbDAF6VR5w/cCMn5hzGCAZowggGWAgEBMIGUMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbQIBADAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMDgwMzI4MTcyODE5WjAjBgkqhkiG9w0BCQQxFgQUxaQaHGQRBiTyfR49MlL5l0+ozLIwDQYJKoZIhvcNAQEBBQAEgYCah0jsv7hVzTtOVts9k5+JGtP+SbxKNDlHb0AmonVXXON+Qgab4TJ5v9i6WDfwU7XS+lbp4tcdik/dJwmHSjpjIU1sMxJgZL7ilv+etL73B6ZliPDzz6rfrTf7pK393rp1nXedbUi80viZD/WIr7q2Dded0XLeE/JD+v4N1V6jgg==-----END PKCS7-----
">
</form>
';
$block4 = '<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="image" src="http://www.filedropper.com/images/block4.jpg" 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">
<input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIH6QYJKoZIhvcNAQcEoIIH2jCCB9YCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYASLCvUOMkNwNPHr3Vf3gl6Pb4/aCe5FLHNiuwS/lw1UseQpMMpVf4wnOqTAHhmWM+AUZhtYXPUqmNiKYlj+k3qP75WLrKvjNbHskfN2tSrrnXOXVztcdoeQv5G2un0Qq+Pgf9VxP2qHQRaO432Hs6H+huwoQFd3Jp+KnLFvbsmyTELMAkGBSsOAwIaBQAwggFlBgkqhkiG9w0BBwEwFAYIKoZIhvcNAwcECHgbR+GC1Nm4gIIBQLL4cS4GPDTAgi0PCrUVrrG5W5NLojJsdzoetSDz+rmYVFFkXnuXS/Idm6HzRBkSsEzIEUJM/fHT17DF1CiIxFHhgwJAmv1Gub3m1202pVnZZIzH1fc69HBoxAr8UXEjEXNZNgBimcx5UgcF2jbQHU/aOKQ6AeLU4UWGWNWXYgj4cz2sP+TMSPUO/7y8bSK2r3xnQCtKdlJijHoZVzqNd643gYAQLSpN0iJQOLtImA58d16JLg+rIxK6x4KCw27afdl3U6O+jUv8cegZwZnIAvwJeX0FlIXiGZ0h5eCUBoAv1st7DZvMX8L7Z8X86qqnZif+4p3FdjPoDpbT2BWgH/DWiRpOLvtEBzq6FgAafod0rWC50GTa9K9ZfVniXVuk3UXrP1vWniaSLoJ5BlFm3eh5zYj3Vx3oMIr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fo6ujionW1hUhPkOBakTr3YCDjbYfvJEiv/2P+IobhOGJr85+XHhN0v4gUkEDI8r2/rNk1m0GA8HKddvTjyGw/XqXa+LSTlDYkqI8OwR8GEYj4efEtcRpRYBxV8KxAW93YDWzFGvruKnnLbDAF6VR5w/cCMn5hzGCAZowggGWAgEBMIGUMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbQIBADAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMDgwMzI4MTczMzE5WjAjBgkqhkiG9w0BCQQxFgQUefu6ndKKyP3B43/p8HgaNK3yaAMwDQYJKoZIhvcNAQEBBQAEgYBpev7bmhjYxBKLEL6MwoWilWEeLbPOglFZA8olmk5w807JOlHz66a2ec3y6I4/q4axIDdHYTl6utRzMq64tQds6wLypkYFZ/AkFS3KL74gvbXS3qNgEQB6dJELQyj3yBGQM0D7VOtzh+xSJTB5PN7YZwhmAM//Xl1Jo85TpEQIGw==-----END PKCS7-----
">
</form>';

echo '<div style="font-size: 14px; font-wieght: bold; text-align: left;"><b>User Account Signup</b><br /><br />Signing up as a member of File Dropper gives you some great benefits.  You\'ll be able to keep track of your files in a handy file manager, add password protection for downloading, mark files as private (only you can download them), and delete unwanted Files.<br /><br />We\'re offering this service to better help out our users, and we\'re offering it at a nominal fee to help us cover the rising cost of bandwidth and storage space.  If you like our little service here and want to keep it around for a bit, then signup for one of our little packages and enjoy the benefits of being a member =)<br /><br /></div>
<table width="60%" align="center">
<tr><td align="center">'.$block1.'</td><td align="center">'.$block2.'</td></tr>
<tr><td align="center"><div style="margin-top: 20px;">'.$block3.'</div></td><td align="center"><div style="margin-top: 20px;">'.$block4.'</div></td></tr>
</table>
';

include 'files/footer.php';

?>
Link to comment
Share on other sites

<?php
include 'files/header.php';
include 'files/myphp.php';
if (!$_SESSION['grabbed']){
        $f = file_get_contents('uniquecount.txt');
        file_put_contents('uniquecount.txt', ($f+1));
        $_SESSION['grabbed'] = 'ty';
}

if(isset($_POST['send'])){
$username = trim($_POST['username']);
if (strlen($username) < 5 || strlen($username) > 25)
		$errors .= 'Usernames must be between 5 and 25 characters!<br />';
else if (ereg('[^A-Za-z0-9]', $username))
		$errors .= 'Usernames can only contain alphanumeric characters!<br />';
if ($_POST['pass1'] != $_POST['pass2'])
		$errors .= 'Passwords do not match!<br />';
else if (strlen($_POST['pass1']) < 5 || strlen($_POST['pass1']) > 25)
		$errors .= 'Passwords must be between 5 and 25 characters!<br />';

if (!$errors){
		$check = mysql_query("SELECT id FROM users WHERE username='".mysql_real_escape_string($username)."' LIMIT 1");
		if (@mysql_numrows($check))
				$errors .= 'Username is already in use!<br />';
}

if (!$errors){
	//Isto convém alterar não?
	$space = 5000;
	$bandwidth = 50000;
	//$space = 25000;
	//$bandwidth = 250000;
	//$space = 10000;
	//$bandwidth = 100000;

	//Não sei se este campo pode ser nulo, mas penso que não por isso assim deve dar
	$transaction = 1;

	mysql_query("INSERT INTO users (username,password,email,signupdate,paidtil,space,bandwidth,transaction) VALUES('".mysql_real_escape_string($username)."', '".md5($_POST['pass1'])."', '".mysql_real_escape_string($_POST['email'])."', ".time().", ".(time()+60*60*30).", '".intval($space)."', '".intval($bandwidth)."', '".mysql_real_escape_string($transaction)."')") or die('Error: '.mysql_error());
	echo '<b>Account Creation Successful!</b><br />Continue to our <a href="/login.php">login</a> page and get started using your account!<br />';
	include 'files/footer.php';
	exit;
}

echo '<div style="color: red;"><b>Error(s):</b> '.$errors.'<br /></div>';
}

echo '<form method="post" action="createaccount.php"><input type="hidden" name="txid" value="'.$_POST['txid'].'" /><table>
	<tr><td><b>Username</b></td><td><input type="text" name="username" value="'.$_POST['username'].'" /></td></tr>
	<tr><td><b>Password</b></td><td><input type="password" name="pass1" /></td></tr>
	<tr valign="top"><td><b>Password</b><br />(retype)</td><td><input type="password" name="pass2" /</td></tr>
	<tr valign="top"><td><b>Email Address</b><input type="text" name="email" value="'.$_POST['email'].'" /></td></tr>
	<tr><td></td><td><input type="submit" name="send" value="Create Account" /></td></tr>
	</table></form>';

include 'files/footer.php';
?>
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.