PHP Save to Text File allows you to save information submiited from a form. A text.tx

Discussion in 'PHP' started by bilt, Feb 20, 2008.

  1. #1
    Can anybody help me with the php script. I need a script of a form to be able to unsubscribe ppl from emailing lists and when they press unsubscibe/remove botton the information their (email) is saved to a txt file on the site. Thank you i found on google this script but im new to php and can't figure this out can anybody please help me. Thank you. here is the script of snippet that i found on google. All i need in my form is e-mail address i dont need the name. THank you ppl i would really appretiate it if you know how to do this would give me ur aim screen name so i could im you and u could explaine it to me thanx or just im me on my aim = biltorest thanks alot guys.

    <!-- Make a form on a page as below -->
    <form action="mytest.php" method="post">
    Name <br><input type="text" name="name">
    Email Address <br><input type="text" name="email">
    <input type="submit" value="submit">
    <!-- Make a receiving page like below-->
    <?php
    $f=fopen("text.txt","a");
    fwrite($f,"****************************************\r\n\r\n");
    fwrite($f," Name: $name\r\n");
    fwrite($f," Email: $email\r\n\r\n");
    fclose($f);
    ?>
    <html>
    <head>
    <title>Thank You</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>

    <body bgcolor="#FFFFFF" text="#000000">

    <?php

    echo "Thank you " . $name . " we have added you to the list";

    ?>
    </body>
    </html>
     
    bilt, Feb 20, 2008 IP
  2. zerxer

    zerxer Peon

    Messages:
    368
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I will IM you. (zerxer)

    EDIT: Nevermind, he already got it resolved.
     
    zerxer, Feb 20, 2008 IP