Advertisement
Guest User

Untitled

a guest
Jun 19th, 2017
542
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.65 KB | None | 0 0
  1. $dbpass = md5($inputpass);
  2.  
  3. $transid = mysql_real_escape_string($_POST['trans_id']);
  4. $paypal = mysql_real_escape_string($_POST['paypal']);
  5.  
  6. $varmonths = $_POST['months'];
  7. if ($varmonths == 0) {
  8. $months = 'lifetime';
  9. }else{
  10. $addmonths = $varmonths * 2592000;
  11. $time = time();
  12. $months = $time + $addmonths;
  13. }
  14.  
  15.  
  16. $sql="INSERT INTO users (username,password,staff,trans_id,paypal,months,active)VALUES ('$inputuser','$dbpass', '$inputtype', '$transid', '$paypal', '$months', 'activated')";
  17. mysql_query($sql) OR DIE(mysql_error());
  18. }
  19. if else = true;
  20. {
  21. $subject = "Login Information";
  22. $headers = "From: test@test.com\r\nReply-To: test@test.com";
  23. $body = '===========================================================================
  24. Username:' . $inputuser .
  25. 'Password:' . $inputpass .
  26. 'PayPal:' . $paypal .
  27. 'Transaction ID:'. $transid .
  28. '===========================================================================';
  29.  
  30. if (mail($paypal, $subject, $body, $headers)) {
  31.  
  32. echo('<strong>' . $inputuser . '</strong> has been added to the database with the password: <strong>' . $inputpass . '</strong>.');
  33. echo('Login Details Sent to: <strong>' . $paypal . '</strong>');
  34. } else {
  35.  
  36. echo('<strong>' . $inputuser . '</strong> has been added to the database with the password: <strong>' . $inputpass . '</strong>.');
  37. echo('Login Details' '<strong> Not </strong> Sent to: <strong>' . $paypal . '</strong>');
  38. }
  39. }
  40.  
  41. }//If Submit isset
  42.  
  43. if(isset($_POST['delete'])){
  44.  
  45. $checkbox=$_POST['checkbox'];
  46.  
  47. //exit;
  48.  
  49. for($i=0;$i<count($checkbox);$i++){
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement