Okay, can someone help me?
Right now I have a form that error checks to make sure all necessary fields are filled in. When the user clicks the submit button it performs this action on the form to do the error checking:
<input type="hidden" name="been_submitted" value="YES" />
if (isset($POST['been_submitted'])=="YES") {
if (!$POST['package']){
$x = FALSE;
$message[] = "You must select a hosting package";
} else {
$x = TRUE;
}
<form method=post action="/order.php" name="orderForm">
(I'm using a rollover image as the submit button, which is why I have the hidden field above)
Now what I want is this. When the user clicks the submit button and all fields have been filled in correctly, the information is sent to https://www.linkpointcentral.com/blahblahblah to bill the credit card.
How do I do this? How can I get it to send the information to the credit card processing company after everything is filled in correctly instead of calling itself and trying to perform the error checking again?
Do I need an if else statement something like this:
if (isset($_POST['been_submitted'])=="YES"){
if (everything is filled in correctly){
action="https://www.linkpointcentral.com/blahblahblah
}
else {
check for errors
}
}
Right now I have something like this when everything is successful:
if ($a and $b and $c) {//if pass the test.
$myemail="order@whatnott.com";
$subject="new order";
$header = "From: $_POST[email]\r\n";
$header .= "X=Mailer: PHP/";
$body="Order Information:
IP Address:
" . $HTTP_SERVER_VARS['REMOTE_ADDR'] . "
Contact Information:
First Name: $POST[firstName]
Last Name: $POST[lastName]
Street Address: $POST[addr]
Apt: $POST[apt]
City: $POST[city]
bstate: $POST[bstate]
Zip: $POST[zip]
bcountry: $POST[bcountry]
Phone: $POST[phone]
Email: $POST[email]
Email Verified: $_POST[verifyEmail]
Only thing is this just sends the information to my email address and not to the credit card processing company.
Please help.
Thanks.