MarvinH
03-10-2006, 11:21 PM
Hello,
Im not very skilled using php, I only know enough to edit codes and maybe combine one with another. In the following code, at the very bottom regardless if the user chooses paypal or another option as the $payment, it will always bring the user to money_order.php now i know im missing some { down there and i've tried placing them where i thought they should be but i've always gotten errors. I would GREATLY appriciate it if someone could help me out with this.
<?PHP
if ( $_GET["act"] == "submit" )
{
mysql_connect( "localhost", "", "" ) or die( mysql_error());
mysql_select_db( "mxchost_billing" ) or die( mysql_error() );
$date = date("y/m/d");
$name = $_POST['name'];
$payment = $_POST['payment'];
$domain = $_POST['domain'];
$email = $_POST['email'];
$address = $_POST['address'];
$city = $_POST['city'];
$state = $_POST['state'];
$country = $_POST['country'];
$postalcode = $_POST['postalcode'];
$phone = $_POST['phone'];
$username = $_POST['username'];
$password = $_POST['password'];
$paypaladdy = $_POST['paypaladdy'];
$si = $_POST['si'];
$query = "INSERT INTO accounts (name,payment,domain,price,plan,email,address,city,state,country,postalcode,phone,registered,due,username,password,paypaladdy,si)
values ('$name','$payment','$domain','$3.25','Basic','$email','$address','$city','$state','$country','$postalcode','$phone','$date','00/00/00','$username','$password','$paypaladdy','$si')";
mysql_query($query) or die (mysql_error());
if($payment == 'paypal')
header('location: paypal.php');
else
header('location: money_order.php');
}
?>
Im not very skilled using php, I only know enough to edit codes and maybe combine one with another. In the following code, at the very bottom regardless if the user chooses paypal or another option as the $payment, it will always bring the user to money_order.php now i know im missing some { down there and i've tried placing them where i thought they should be but i've always gotten errors. I would GREATLY appriciate it if someone could help me out with this.
<?PHP
if ( $_GET["act"] == "submit" )
{
mysql_connect( "localhost", "", "" ) or die( mysql_error());
mysql_select_db( "mxchost_billing" ) or die( mysql_error() );
$date = date("y/m/d");
$name = $_POST['name'];
$payment = $_POST['payment'];
$domain = $_POST['domain'];
$email = $_POST['email'];
$address = $_POST['address'];
$city = $_POST['city'];
$state = $_POST['state'];
$country = $_POST['country'];
$postalcode = $_POST['postalcode'];
$phone = $_POST['phone'];
$username = $_POST['username'];
$password = $_POST['password'];
$paypaladdy = $_POST['paypaladdy'];
$si = $_POST['si'];
$query = "INSERT INTO accounts (name,payment,domain,price,plan,email,address,city,state,country,postalcode,phone,registered,due,username,password,paypaladdy,si)
values ('$name','$payment','$domain','$3.25','Basic','$email','$address','$city','$state','$country','$postalcode','$phone','$date','00/00/00','$username','$password','$paypaladdy','$si')";
mysql_query($query) or die (mysql_error());
if($payment == 'paypal')
header('location: paypal.php');
else
header('location: money_order.php');
}
?>
