Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if (isset($_POST['enviar'])) {
- $nom = $_POST['nome'];
- $fone = $_POST['tel'];
- $cp = $_POST['cpf'];
- $quebra = chr(13).chr(10);
- if ($file = fopen("cli/clientes.txt", "a+")) {
- fputs($file, "$nom;$fone;$cp;$quebra");
- fclose($file);
- header("Location: ind.html");
- } else {
- header("Location: ind.html?
- msg=Erro fatal");
- }
- }
- if (isset($_POST['enviar'])) {
- $endereco = $_POST['end'];
- $valor = $_POST['val'];
- $situacao = $_POST['sit'];
- $quebra = chr(13).chr(10);
- if ($file = fopen("imo/imoveis.txt", "a+")) {
- fputs($file, "$endereco;$valor;$situacao;$quebra");
- fclose($file);
- header("Location: ind.html");
- } else {
- header("Location: ind.html?
- msg=Erro fatal");
- }
- }
- if(isset($_POST['enviarr'])){
- echo "<strong>LISTA DE CLIENTES</strong> <br>";
- $arq = fopen("cli/clientes.txt", "r");
- while (!feof($arq)){
- $str = fgets($arq);
- echo $str;
- echo "<br>";
- }
- fclose($arq);
- }
- echo "<strong>LISTA DE IMOVEIS</strong> <br>";
- $arq = fopen("imo/imoveis.txt", "r");
- while (!feof($arq)){
- $str = fgets($arq);
- echo $str;
- echo "<br>";
- }
- fclose($arq);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement