Jump to content
xisto Community
Sign in to follow this  
midnightvamp

Website Form Not Sending Correctly Any ideas?

Recommended Posts

Okay, so I've been trying to set up a form on my site, that would allow people to submit three things:Language, Phrase and MeaningExample:Language: JapanesePhrase: Ohayo gozaimasuMeaning: Good morningAnyway, I've searched through these forums here, and ones that are off site, and tried to come up with some stuff... but whenever I find examples that I try, they aren't quite what I'm looking for, so I change things, to fit what I need, so that it looks right on my site, but then it doesn't send at all, or not correctly.I could do it fine I think, if I knew what the address for the cgi-bin thing is, but after looking through these boards, I've seen a few different ones posted, but none of them worked when I tried them out for me. Is that because I need a special page added or something?I also tried to set up a php thing, because I found tutorials for that sort of thing which didn't seem that hard, but I don't know php, so I got pretty lost pretty quickly. So, the latest one I've attempted goes something like this (By this point, I thought the simpler the better):

<form method="post" action="http://chromlea.trap17.com/usr/sbin/sendmail"><input type="hidden" name="destination" value="chromlea@gmail.com"><input type="hidden" name="subject" value="New Information"><P>Language: <input type="text" name="language" size="35"><br>Phrase: <input type="text" name="phrase" size="35"><br>Meaning: <input type="text" name="meaning" size="35"><br><input type="submit" value="Submit"></form>

Am I anywhere on the right track? Would that work if I had the right cgi-bin address (or whatever it is called?) And do I have to add an extra page to the cgi folder to handle the forms or not? Sorry, I've been trying to get this form to work for hours, and I was hoping that you'd be able to help me.If you need any other information, just let me know, I tried to be thorough, so that you could see where I am messing up.

Notice from BuffaloHELP:
Edited as requested.
Edited by BuffaloHELP (see edit history)

Share this post


Link to post
Share on other sites

If you simply want the results of the form to be emaild to you then I think it would be easier to use PHP. Use this code for the form:

<form method="post" action="sendmail.php">
<P>
Language: <input type="text" name="language" size="35"><br>
Phrase: <input type="text" name="phrase" size="35"><br>
Meaning: <input type="text" name="meaning" size="35"><br>
<input type="submit" value="Submit">
</form>



Then create a new file called sendmail.php and make sure it is in the same folder as the HTML form. Put this into the sendmail.php file using a text editor like notepad:

<?php$language = $_POST['language'];$phrase = $_POST['phrase'];$meaning = $_POST['meaning'];$subject = "New Information";$address = "chromlea@gmail.com";$message = "Language: ";$message .= $language;$message .= "     Phrase: ";$message .= $phrase;$message .= "     Meaning: ";$message .= $meaning;mail($address, $subject, $message) or die("There was an error sending the email");?>

Try that and see if it does what you want it to. If not, or there are any errors then feel free to ask for help ;)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.