I have been grappling with POST passes for a week now trying to get my site ready for use with CCBill.
I finally got rid of the Fatal Error’s from the $_POST commands (ccbill’s guide was using ()’s instead of brackets) but now the data is not even passing through the post form.
here is the form:
[code]
<html>
<body>
<form action=”join2.php” method=post”>
Username: <input type=text name=username><br>
Password: <input type=text name=password><br>
Email: <input type=text name=email><br>
<input type=submit value=”Register Your Account!”>
</form>
</body>
</html>
and the php page:
[code]
<?php
//$order = ini_get(‘variables_order’);
//print $order;
$fName = $_POST[username];
//$fPass = password;
//$fEmail = email;
echo ($fName);
function connect()
{
$link = mysql_connect(“localhost”,”xxx”,”xxx”)
or die(‘Could not connect: ‘ . mysql_error());
echo “Connection Successfuln”;
mysql_select_db(‘xilohen_XiloGallery’) or die(‘Could not select database’);
// Printing results in HTML
$text = “n”;
echo nl2br($text);
echo nl2br($text);
print($fName);
echo “, thank you for purchasing a subscript with us! You’re account will become active in 2 to 5 minutes.”;
echo nl2br($text);
echo nl2br($text);
echo “To access the memebers area, please goto the Home page and click on the Gallery link.”;
$g_id = 100;
$sql = “INSERT INTO g2_User (g_id, g_userName, g_hashedPassword, g_email) VALUES(‘$g_id’, ‘$fName’,’$fPass’,’$fEmail’)”;
$result = mysql_query($sql);
$created = 0;
for ($g_id; $created < 1; $g_id += 1)
{
$sql = “INSERT INTO g2_User (g_id, g_userName, g_hashedPassword, g_email) VALUES(‘$g_id’, ‘$fName’,’$fPass’,’$fEmail’)”;
$result = mysql_query($sql);
if ($result){
echo “Account Created Successfully”;
$created = 1;
}
//if (!$result){
//echo “Account Creation Failed”;
//print(mysql_error());
}
// Closing connection
mysql_close($link);
}
?>
<?php
$text = “n”;
echo nl2br($text);
echo nl2br($text);
connect();
?>
<?php
if (!isset($_POST[‘submitForm’])) {
?>
<form action=’https://bill.ccbill.com/jpost/signup.cgi’ method=POST>
<tr>
<td><input type=hidden name=clientAccnum value=’937901′>
<input type=hidden name=clientSubacc value=’0000′>
<input type=hidden name=formName value=’141ck’>
<input type=hidden name=language value=’English’ >
<input type=hidden name=allowedTypes value=’0000000010:840,0000000446:840,0000001354:840′ >
<input type=hidden name=subscriptionTypeId value=’0000000010:840′ >
<input type=hidden name=username value=>
<input type=hidden name=password value=password>
<input type=hidden name=email value=email>
<input type=submit name=submit value=’Continue to payment page (Online Check)’></td>
</tr>
</form>
<?php
} else {
echo “Form submitted!”;
}
?>
/*<form action=’https://bill.ccbill.com/jpost/signup.cgi’ method=POST>
<input type=hidden name=clientAccnum value=’937901′>
<input type=hidden name=clientSubacc value=’0000′>
<input type=hidden name=formName value=’141ck’>
<input type=hidden name=language value=’English’ >
<input type=hidden name=allowedTypes value=’0000000010:840,0000000446:840,0000001354:840′ >
<input type=hidden name=subscriptionTypeId value=’0000000010:840′ >
<input type=hidden name=username value=>
<input type=hidden name=password value=password>
<input type=hidden name=email value=email>
<input type=submit name=submit value=’Continue to payment page (Online Check)’>
</form>
<form action=’https://bill.ccbill.com/jpost/signup.cgi’ method=POST>
<input type=hidden name=clientAccnum value=’937901′>
<input type=hidden name=clientSubacc value=’0000′>
<input type=hidden name=formName value=’141cc’>
<input type=hidden name=language value=’English’ >
<input type=hidden name=allowedTypes value=’0000000010:840,0000000446:840,0000001354:840′ >
<input type=hidden name=subscriptionTypeId value=’0000000010:840′ >
<input type=hidden name=currencyCode value=’840′ >
<input type=hidden name=username value=username>
<input type=hidden name=password value=password>
<input type=hidden name=email value=email>
<input type=submit name=submit value=’Continue to payment page (Credit Card [MasterCard/JCB/Discov.])’>*/