need a basic script if some one could help

Discussion in 'PHP' started by nicky s, Aug 4, 2010.

  1. #1
    hey guys

    im after a basic script that will add email addresses to a .txt file.

    the person will place there email addresses into the box and click submit, when they click submit there email addresses will be added to the text file and they will be shown a message thats says thanks

    with this sort of look

    
    <label>
    <input type="text" name="textfield" />
    </label>
    <label>
    <input type="submit" name="Submit" value="Submit" />
    </label>
    
    Code (markup):
    cheers
     
    nicky s, Aug 4, 2010 IP
  2. danx10

    danx10 Peon

    Messages:
    1,179
    Likes Received:
    44
    Best Answers:
    2
    Trophy Points:
    0
    #2
    Try yourself first don't expect us to create you a 'basic' script with you just playing lazy.

    1. Wrap form tags (with method="post") around your input fields.
    2. Use if statement/s, isset(), preg_match() for validation...
    4. Use fopen() and fwrite() to write/and create text file.
     
    danx10, Aug 4, 2010 IP
  3. nicky s

    nicky s Peon

    Messages:
    199
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #3
    i would try but i dont know php at all i can sort of read it and understand it but i cant build from scratch
     
    nicky s, Aug 4, 2010 IP
  4. danx10

    danx10 Peon

    Messages:
    1,179
    Likes Received:
    44
    Best Answers:
    2
    Trophy Points:
    0
    #4
    Sorry to be blunt, but I suggest you look/read up PHP tutorial/s online as thats how many started, this forum is for PHP help, where users submit their problems/questions related to PHP and have shown they've tried - but could'nt succeed; theirfore need the help of other users.

    You don't ask for us to code a script for you, if you ASK then you might aswell hire us via the BST, we will not spoon feed you.
     
    danx10, Aug 4, 2010 IP
  5. Thorlax402

    Thorlax402 Member

    Messages:
    194
    Likes Received:
    2
    Best Answers:
    5
    Trophy Points:
    40
    #5
    Read about form submission and php. After you understand how the data is passed with forms, then it should only be a couple lines of code to accomplish your goal. I have to agree with the others though. You should definitely try to do something like this yourself.
     
    Thorlax402, Aug 4, 2010 IP