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
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.
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
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.
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.