i need a simple php script done..

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • xxweekxx
    Confirmed User
    • Oct 2002
    • 6780

    #1

    i need a simple php script done..

    hey guys i need a simple php script that will take form fields and post to txt file on server..

    like i'll have a simple form with name, email, phone#, and it'll post it with comma to text file

    Example John Smith, [email protected], 755-521-2551
    _________________
    I am the best
  • woj
    <&(©¿©)&>
    • Jul 2002
    • 47882

    #2
    icq: 33375924
    Custom Software Development, email: woj#at#wojfun#.#com to discuss details or skype: wojl2000 or gchat: wojfun or telegram: wojl2000
    Affiliate program tools: Hosted Galleries Manager Banner Manager Video Manager
    Wordpress Affiliate Plugin Pic/Movie of the Day Fansign Generator Zip Manager

    Comment

    • psili
      Confirmed User
      • Apr 2003
      • 5526

      #3
      Dirty. Didn't error check it.

      Code:
      <?PHP
      $vars = array();
      $submit = false;
      if(isset($_POST["name"]))
      {
        $vars = $_POST;
        $submit = true;
      }
      else if (isset($_GET["name"]))
      {
        $vars = $_GET;
        $submit = true;
      }
      if($submit)
      {
      $fp = fopen("formdata.txt","a");
      $str = $vars["name"].",".$vars["email"].",".$vars["phone"]."\n";
      fwrite($fp,$str);
      fclose($fp);
      }
      ?>
      <html>
      <form>
      ........
      Your post count means nothing.

      Comment

      Working...