Current location: Hot Scripts Forums » Programming Languages » PHP » Form Results to an HTML or Text File


Form Results to an HTML or Text File

Reply
  #1 (permalink)  
Old 09-25-04, 10:25 AM
bxcheats bxcheats is offline
Newbie Coder
 
Join Date: May 2004
Posts: 64
Thanks: 0
Thanked 0 Times in 0 Posts
Form Results to an HTML or Text File

I have a form I would like to submit to an HTML file, it consists of a multiline text and a submit button. Users will submit links in the textbox, usually multiple ones, but only one per line. I want all the links to go to an html or text file listed one per line. How would I do this? I plan on using PHP unless there is an easier option.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 09-25-04, 10:31 AM
Eclipse's Avatar
Eclipse Eclipse is offline
Coding Addict
 
Join Date: May 2004
Location: Long Island, New York
Posts: 356
Thanks: 0
Thanked 0 Times in 0 Posts
Can you please post the form otherwise it's really pretty hard to do that for you?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 09-25-04, 10:36 AM
bxcheats bxcheats is offline
Newbie Coder
 
Join Date: May 2004
Posts: 64
Thanks: 0
Thanked 0 Times in 0 Posts
Here is the file
Attached Files
File Type: zip form.zip (571 Bytes, 274 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 09-25-04, 11:46 AM
bxcheats bxcheats is offline
Newbie Coder
 
Join Date: May 2004
Posts: 64
Thanks: 0
Thanked 0 Times in 0 Posts
OK, I figured everything out.

Form:

<form name="form1" method="post" action="submit.php">
TEXTAREA NAME=usertxt COLS=20 ROWS=5></TEXTAREA>
<p align="center">
<input type="submit" name="Submit" value="Submit">
</p>
</form>

Submit.php:

<?
$fp=fopen("usertxt.txt","w");
fwrite($fp,addslashes($usertxt));
fclose($fp);
Header("location: index.html");
exit();
?>

What I want it to do is add on to the text file, not delete everything in it and add what the form says. For example I type "Joe" in on one day and the next day I type "Bob". The text file should read:

Joe
Bob

Does anyone know how to do this?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
html tutoral thefrtman HTML/XHTML/XML 5 04-27-09 11:25 AM
formmail problem gscraper Perl 12 08-27-04 04:06 AM
Upload file to table so ONLY files tied to primary key are displayed in record? grafixDummy PHP 4 12-20-03 05:28 PM
picking random entries with a filter... Double selection problem dsumpter PHP 7 11-16-03 08:19 PM
Need to submit form to database and text file - Any ideas how? dpreiss ASP 1 08-21-03 07:02 PM


All times are GMT -5. The time now is 01:11 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.