Click to See Complete Forum and Search --> : Email Form


HackerX
10-22-2003, 07:44 PM
say I have a form like this one -

http://www10.brinkster.com/hackerxra/HTML/EmailForm2.html

and I want it to email the fields to me, how can I achieve this?

Khalid Ali
10-22-2003, 07:49 PM
if you can use a server side language,thats a better solution.
However in absence of that you cna use this

<form id="form1" action="mailto:yourEmail@email.com" onsubmit="" method="post" enctype="text/plain">

HackerX
10-22-2003, 08:19 PM
whats server side language? becuz this one isnt working how Id want it to. It keeps popping up a IE do you want to continue message saying how it has to do with email and than it opens this thing asking for a outlook mail account, is there anyway to prevent it from doing so and not use a mail client and send it durectly?

Khalid Ali
10-22-2003, 08:25 PM
See thats the problem with this procedure.
for this to work correctly your browser must know that you have an email client properly set on a system to handle emails.
on the other hand if you could use,php or jsp etc you can submit the form to web server and forward it to any email address

HackerX
10-23-2003, 07:01 AM
do you know how to do that? like in a php file what all do I have to put in it? I know for form action I just have to send it to the php document instead if my email and inside the php put my email but what would I put around it to auto forward it to my email address?

stringman
10-23-2003, 07:48 AM
Here is a link to some info on emailing forms:
http://www.allmyfaqs.com/faq.pl?Email_form_data

This link will take you to a message board where the same question was posed. One of the responders provided the ASP code to make it work. I've been working on the same problem and was able to get the ASP to partially work. Maybe it will work for you:
http://www.experts-exchange.com/Web/Web_Languages/HTML/Q_20683590.html

action="mailto:..." is not reliable

Stringman

Khalid Ali
10-23-2003, 07:49 AM
with php its extremely simple procedure,just get the data out of your HTTP header put it in a string .e.g
$data; and then just pass it to a built in function mail

mail($to, $subject, $msg, $headers);

Where
$to is destination email address
$headers = "From Form Mailer" etc

subject and msg are self explanatory

HackerX
10-23-2003, 04:19 PM
so all I have to do is save a document as PHP with that line only?

sry but I dont understand what Im supposed to fill in for msg and headers, for the message of the email I want the data from the form and I have no clue what you mean by header, sorry but I am new at this linking to other file stuff.

EDIT: ok I checked out the BignoseBird.com thing that has this script before me and its talking about unix servers and cgi bins. what if Im just using a brinkster account. I dont kow if it has these special folders or not. can I just create one with the same name they are talking about and it can work?

HackerX
10-23-2003, 04:54 PM
also maybe a mod could move this to the CGI forum as they might be able to help me better. thx

EDIT: I just read I need a Unix or Linux host to do this is that true and does anyone know where I can get a free one? also will these have a cgi-bin I also read that I need one so I am assuming that means I just cant create a folder called that becuz I tried it and when I linked to it all I got was a page not found error.