include("scripts/functions.php"); $amount = $_GET['amount']; if (isset($_POST['confirm'])) { /* get Form data */ $invoice_no = preg_replace('#[^a-z.,0-9 -()+]#i', '', $_POST['invoice_no']); $amount = preg_replace('#[^.0-9]#i', '', $_POST['amount']); $notes = preg_replace('#[^a-z.,0-9 -()+?]#i', '', $_POST['notes']); $email = $_POST['email']; $payment_id = '02-'.rand().date(dmy); $payment_type = "monthly"; $erorr = ""; //EMAIL Validation $email = stripslashes($email); $email = str_replace('\\','', $email); $email = str_replace('/','', $email); $email = strip_tags($email); if (check_email_address($email)) { $validemail = 1; } else { $validemail = 0; } if (empty($invoice_no) || empty($amount) || empty($email)) { $error = 'ERROR: please fill in the required information marked with *'; $error .= '
'; if (empty($invoice_no)) { $error .= 'Invoice No'; } else if ($validemail == 0) { $error .= "ERROR: Email address you have entered is invalid"; } else {//Store Data and goto Payment Overview page session_start(); $_SESSION['invoice_no'] = $invoice_no; $_SESSION['amount'] = $amount; $_SESSION['notes'] = $notes; $_SESSION['email'] = $email; $_SESSION['payment_id'] = $payment_id; $_SESSION['payment_type'] = $payment_type; header("Location: payment_overview.php"); exit; } } http: ?>
'; } if (empty($amount)) { $error .= 'Invoice Amount
'; } if (empty($email)) { $error .= 'Email Address
'; } $error .= '