HELP!!! Easiest way to do HTML Forms

 
Post new topic   Reply to topic    Aprelium Forum Index -> General Questions
View previous topic :: View next topic  
Author Message
RawLIMIT
-


Joined: 23 Oct 2003
Posts: 4

PostPosted: Thu Jan 29, 2004 7:33 am    Post subject: HELP!!! Easiest way to do HTML Forms Reply with quote

I need to do a simple form wiht name: and email: and i want to save to a txt file.... What is the easiest way to do this.... Im good with HTML but thats about it.....
Back to top View user's profile Send private message
Anonymoose
-


Joined: 09 Sep 2003
Posts: 2192

PostPosted: Thu Jan 29, 2004 9:21 am    Post subject: Reply with quote

Well, the ultimate simplest way is to do a form with the submit action as a mailto - if the user has an email client properly configured, it will send off a mail when they click submit. You can make it attach the form entries as a text file. However, you will be excluding anyone who doesn't have an email account set up...

Probably the best way to do it would be set up perl or PHP on your server and use an existing script. What exactly are you wanting to do, just create a simple subscription mailing list ?
Back to top View user's profile Send private message
RawLIMIT
-


Joined: 23 Oct 2003
Posts: 4

PostPosted: Thu Jan 29, 2004 9:41 am    Post subject: Reply with quote

Im going to be setting up a multiplayer game competition, so I just wanted to have a sign up form with there Player Name, Email address and maybe some other info, and then have it saved to a master list, in a text file...If you know any tutorials or can help in any way, would be greatly appreciated
Back to top View user's profile Send private message
Anonymoose
-


Joined: 09 Sep 2003
Posts: 2192

PostPosted: Thu Jan 29, 2004 9:55 am    Post subject: Reply with quote

There's a very nice little example doing exactly that here...

http://codewalkers.com/tutorials/57/8.html
Back to top View user's profile Send private message
RawLIMIT
-


Joined: 23 Oct 2003
Posts: 4

PostPosted: Thu Jan 29, 2004 10:06 am    Post subject: Reply with quote

Sounds like exactly what i need, now where do i put each of the files....sorry not big on PHP....

Thanks for the help
Back to top View user's profile Send private message
RawLIMIT
-


Joined: 23 Oct 2003
Posts: 4

PostPosted: Thu Jan 29, 2004 10:35 am    Post subject: Reply with quote

GOT IT!, THANKS FOR THE HELP!
Back to top View user's profile Send private message
Karasu Kami
-


Joined: 22 Sep 2003
Posts: 712
Location: Colorado

PostPosted: Fri Jan 30, 2004 1:08 am    Post subject: Reply with quote

Anonymoose wrote:
There's a very nice little example doing exactly that here...

http://codewalkers.com/tutorials/57/8.html


Anony, could you help me customize this script?*

I don't know PHP, so i couldn't do it well by myself. ^^;


*Or anyone with PHP experience/knowledge.
_________________
Thank you all. Aprelium most importantly.
*Some may not be complete*
http://paeon-hosting.com
http://quartermoon.info
http://loc.paeon-hosting.com
http://genjipoetry.paeon-hosting.com
Back to top View user's profile Send private message Send e-mail Visit poster's website AIM Address MSN Messenger
Anonymoose
-


Joined: 09 Sep 2003
Posts: 2192

PostPosted: Fri Jan 30, 2004 1:37 am    Post subject: Reply with quote

What do you want it to do ? There are others here a lot more advanced than me in PHP, but I know enough to get by - I hope :D
Back to top View user's profile Send private message
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Fri Jan 30, 2004 1:44 am    Post subject: Reply with quote

I know PHP , but I can't help you with customizing this script , instead im
posting my PHP script that I wrote using a little PHP skills I learned. Actually
I have 2 books on PHP and MySQL , im a PHP Freak. I should know more later!

PHP Code: post.php
------------
.Name
.E-mail
.Comments

Code:
<title>Your Title</title>
<body bgcolor="white">
<?php
$filename ="data.html";
$handle= fopen($filename,'a');
$string = "<hr>
<font color=\"blue\" font size=\"4\">
Name: <font color=\"red\" font size=\"3\">
$_POST[name] <br><br> <font color=\"blue\" font size=\"4\">
E-mail: <a href=\"mailto:$_POST[email]?subject=Your Subject &body=To: $_POST[name]\"><font color=\"skyblue\" font size=\"3\">$_POST[email]</a>
<br><br> <font color=\"blue\" font size=\"4\">
Comments: <font color=\"black\" font size=\"3\">
$_POST[comments] <br> <br><hr>\n <br><br>";
fputs($handle, $string);
fclose($handle);
echo "<font color=\"white\" font size=\"4\">Hey <font color=\"skyblue\">$_POST[name] <font color=\"black\" font size=\"4\">, thank you for contacting me , your profile was saved and it will be reviewed.";
?>



HTML Form: form.html
-------------
Code:

<form action="post.php" method="post">
Name: <input type="text" name="name"><br>
E-mail: <input type="email" name="email"><br>
<textarea maxlength=3 name="comments" maxlength="10" rows="5" cols="25" title="Type some information here"></textarea><br>
<input type="submit" value="Submit"><input type="reset" value="Reset"></form>

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

You can change colors if you want , don't remove any \ between the = signs and " , this is very important or you will get an Error 200 , my book showed me this tip. Enjoy the script ! 8)
Back to top View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> General Questions All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group