Re: OT: How to use html form input to append input to a file…

Top Page
Attachments:
Message as email
+ (text/plain)
+ (text/html)
+ (text/plain)
Delete this message
Reply to this message
Author: keith smith
Date:  
To: Main PLUG discussion list
Subject: Re: OT: How to use html form input to append input to a file?


Using PHP would probably be the easiest.

As Kevin said change the form action to the script you want to perform the processingYour form is set to post : method=POSTIn your script process the $_POST array to obtain the data from the form.
Look at fopen and fwrite and see which meets your needs. You probably want to open the file for append.
http://php.net/manual/en/function.fwrite.php

http://www.php.net/manual/en/function.fopen.php

Hope this helps.

------------------------

Keith Smith

--- On Fri, 7/22/11, Kevin Fries <> wrote:

From: Kevin Fries <>
Subject: Re: OT: How to use html form input to append input to a file?
To: "Main PLUG discussion list" <>
Date: Friday, July 22, 2011, 10:42 AM

On 07/22/2011 11:37 AM, wrote:
> The form input model below works fine to send form input via email, but
> how can I modify it to write (append) the form input to a text file in a
> designated directory in my web hosted space instead of to email?
>
> <form action=http://www.bluehost.com/bluemail method=POST>
> Email address:<input size=35 maxlength=90 name=Emailfrom><br>
> Enter message:<br>  <textarea name=Message rows 7 cols=50
> wrap=virtual></textarea>
> <input type=hidden name=subject value=Subject>
> <input type=hidden name=required value= message>
> <input type=hidden name=sendtoemail value=>
> <input type=hidden name=redirect value=http://www.URLaddress.com>
> <input type=submit value=Send>
> </form>


This form sends its information to a script called bluemail on your web server.  That script sends the email.  So, you will need to either edit that script, or write a new one and redirect the action= in the form command to the new script.

So, it depends on language options.

Kevin Fries
---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss