Log in

View Full Version : HTML Form Help!



Meep_Slayer
07-05-2006, 12:59 AM
GUESTS PLEASE REGISTER TO HELP - THERE ARE A LOT OF YOU ONLINE; BUT ONLY TWO MEMBERS - ME AND ANOTHER PERSON

I made a quick, relatively-simple HTML e-mail form by hand, because I really need it to work.

I have the code below, and I have spaced it out to help organize it a bit:


<form action="MAILTO:arrowhead2@gmail.com" method="post" enctype="text/plain">
<fieldset>
<fieldset>
All of the fields are required. (For the checkbox fields, this means either black or checked.)
</fieldset>
<BR>
<BR>
<fieldset>
<legend>UserNames</legend>
<input type="text" name="RSCentre Username:" value="RSCentre Username" >
<BR>
<BR>
<input type="text" name="RuneScape Username:" value="RuneScape Username" >
</fieldset>
<BR>
<BR>
<fieldset>
<legend>Comments and Ideas</legend>
<textarea rows="5" cols="30" name="comments">
This is where you can put your comments, ideas, and problems about RSCentre.
You may express everything about RSCentre that you wish to; as there are no rules and no character limit.
</textarea>
</fieldset>
<BR>
<BR>
<fieldset>
<legend>Personal Info</legend>
<input type="text" name="email" value="E-Mail Address">
<BR>
<BR>
<input type="checkbox" name="anonymous"> I wish to remain anonymous.
(Note: If you choose this option, you will not get credit and/or Advancement Points if something good comes out of your submission!)
<BR>
<BR>
<input type="checkbox" name="reply"> I would like a reply to this submission. (Replies will be sent to the sender's e-mail.)
</fieldset>
<BR>
<BR>
<input type="submit" value="Sumbit">
<input type="reset" value="Reset Form">
</fieldset>
</form>

But IT JUST WON'T WORK! I have DOUBLE-checked, TRIPLE-checked, and QUADRUPLE-checked this thing and I can't find anything wrong.

I've known DD to be a great coding site, so I came here. :p

The site I'm using it on is RSCentre (rs-centre.co.nr), and it's in the Forum Feedback Forum, but you'll have to register to see it.

Anyways, could somebody PLEASE figure out what I did wrong with it and fix it (while trying to ignore the contents...)?

BLiZZaRD
07-05-2006, 01:10 AM
I tested it on my own page. Loaded it, entered all the fields, checked the checkboxes, and clicked submit.

It loaded my email, everything filled out... all I had to do was hit send...

So what is it exactly NOT doing that you want it to do?

Meep_Slayer
07-05-2006, 01:13 AM
Hmmm... Maybe I went about this all wrong.

I was looking for this form to be filled out, then when they hit "Submit", an e-mail would be sent directly to me from the page; like I've seen it done numerous times before.

I don't mean filling things out, hitting "Submit", having an e-mail editor open, and then hitting "send".

And I thought I was good with HTML. :mad:

BLiZZaRD
07-05-2006, 02:06 AM
You could try using HTML and PHP...

Use the HTML to gather the info, use PHP to do the work...

on HTML page:



< form method="post" action="sendmail.php">
Email: < input name="email" type="text" />
Message:
< textarea name="message">
< /textarea>
< input type="submit" />
< /form>


then make a sendmail.php with the following:



< ?
$email = $_GET['email'] ;
$message = $_GET['message'] ;
mail( "yourname@example.com", "Email Subject", $message, "From: $email" );
print "Congratulations your email has been sent";
?>



Of course you just add your extra options in there like normal and add them to the mail () function.


.... Now I just wait for Twey to come in and smack me around for doing something stupid :p