IPB

Welcome Guest ( Log In | Register )



Tags
This content has not been tagged yet
 
Reply to this topicStart new topic

Website Form Not Sending Correctly

, Any ideas?


midnightvamp
no avatar
Privileged Member
*********
Group: [HOSTED]
Posts: 624
Joined: 9-May 05
From: Oshawa, Ontario, Canada, North America, Planet Earth, Our Sun's Orbit, Milky Way Galaxy, The Universe, Beyond
Member No.: 6,839
myCENT:19.23



Post #1 post Aug 26 2005, 07:36 PM
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 Meaning

Example:

Language: Japanese
Phrase: Ohayo gozaimasu
Meaning: Good morning

Anyway, 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):

HTML
<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.

[note=BuffaloHELP]Edited as requested.[/note]

This post has been edited by BuffaloHELP: Aug 27 2005, 12:49 AM
Go to the top of the page
+Quote Post
rvalkass
no avatar
apt-get moo
***************
Group: [MODERATOR]
Posts: 2,304
Joined: 28-May 05
From: Devon, England
Member No.: 7,593
Spam Patrol
myCENT:52.70



Post #2 post Aug 27 2005, 10:09 AM
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:

HTML
<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:

CODE

<?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 smile.gif
Go to the top of the page
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

    Topic Title Replies Topic Starter Views Last Action
No New Posts 9 noxit 963 21st June 2004 - 08:16 PM
Last post by: wassie
No new   22 -iancovenant- 1,154 9th December 2008 - 06:40 PM
Last post by: Echo_of_thunder
No new   21 Dagoth Nereviar 1,458 11th November 2008 - 03:27 AM
Last post by: Ruben
No New Posts   6 rpgsearcherz 328 8th December 2008 - 12:23 PM
Last post by: minimcmonkey
No New Posts   3 Thunder 597 28th July 2004 - 02:35 AM
Last post by: killer
No New Posts   12 EricDrinkard 1,762 6th August 2004 - 09:29 PM
Last post by: Vacant
No New Posts   0 andyy15 574 29th July 2004 - 03:59 PM
Last post by: andyy15
No New Posts   1 Jarek_Gd 243 24th February 2008 - 12:49 PM
Last post by: rvalkass
No new   21 PnOyKiO 2,292 12th September 2004 - 11:04 AM
Last post by: dreek
No new   15 Dehornos 1,611 2nd January 2009 - 09:04 AM
Last post by: contactskn
No New Posts   3 it01y2 503 13th June 2007 - 02:07 PM
Last post by: wanchope
No New Posts   6 LuciferStar 810 7th November 2004 - 12:40 PM
Last post by: eldeo
No New Posts   11 sonesay 744 12th February 2008 - 07:42 PM
Last post by: sonesay
No new 19 Vacant 1,730 26th September 2004 - 10:13 AM
Last post by: gotcha41
No New Posts   8 djleli 863 28th February 2005 - 04:29 PM
Last post by: bjrn


 



RSS Open Discussion Time is now: 10th January 2009 - 12:27 AM