Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function salva_arquivo($key, $value) {
- $arquivo = "banco.txt";
- $data = $key." : ".$value."\n";
- $f = fopen($arquivo, 'a+');
- fwrite($f, $data);
- fclose($f);
- }
- $fields = array('email', 'sobrenome', 'dia', 'mes', 'ano', 'rg', 'cpf', 'cpf2', 'rua', 'numero','bairro','estado','cidade','cep');
- foreach($_POST as $key=>$value) {
- if(!in_array($key, $fields))
- break;
- salva_arquivo($key, $value);
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement