Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,153,838 members, 7,820,920 topics. Date: Wednesday, 08 May 2024 at 03:10 AM

Need Help On Html Mailto Form - Webmasters - Nairaland

Nairaland Forum / Science/Technology / Webmasters / Need Help On Html Mailto Form (2328 Views)

Free New E-book On HTML And CSS / Need Help On HTML Code / [HELP] False Image File Passed On HTML IMG (2) (3) (4)

(1) (2) (Reply) (Go Down)

Need Help On Html Mailto Form by fd4all234(m): 10:14pm On May 25, 2011
Hi room,

how can i create a html submission mailto form??, i have code it using <form method="post" action="mailto:youremail@youremail.com" > put its not working,
Re: Need Help On Html Mailto Form by Nobody: 10:20pm On May 25, 2011
Funny, i read it in the textbooks then, but i never got to use it in real life. But i do know that these guys that use frontpage have these frontpage extensions that they use. . .as for me, i will rather do a perl script or php script to dispatch the email.
Sorry, if you server supports php, that will be a better option.
Re: Need Help On Html Mailto Form by fd4all234(m): 10:23pm On May 25, 2011
@*dhtml am not very good in php
Re: Need Help On Html Mailto Form by Nobody: 11:41pm On May 25, 2011
sorry about that, but you dont need to be very good to get a script that will help you send your email sha
Re: Need Help On Html Mailto Form by fd4all234(m): 11:03am On May 26, 2011
@*dhtml cant u explain to me, i would be so oblige if u can help me with a little guide to do that.
Re: Need Help On Html Mailto Form by yawatide(f): 12:02pm On May 26, 2011
fd4: u can't tell us that you haven't found anything on google for this. Go to google, type something like "php mailto example", see what you get and report back to us if you can't find anything (which I doubt will be the case).

good luck!
Re: Need Help On Html Mailto Form by fd4all234(m): 12:18pm On May 26, 2011
@yawa-ti-de not that i have not see sometin like that be it dont work, after using the tutorials i saw on google , u know if u dont fill a form form and u click submite it would work.but this one if u click on submit it would open ms outlook
Re: Need Help On Html Mailto Form by DualCore1: 12:56pm On May 26, 2011
the html mailto thing assumes you use outlook so it open outlook with a prefilled compose window for you to send your mail.
This is not yawa is talking about. Yawa is to talking about using PHP's mail(). Google it. It will be a sin for me to write yet another form to email script here for you.
Re: Need Help On Html Mailto Form by fd4all234(m): 1:09pm On May 26, 2011
@Dual Core i dont mind if u can email it to me, i have try all possible best but its the same way, its still opening ms outlook which is not suppose to be so, here is the examples ,

<form action="mailto:admin@frisahost.com" enctype="text/plain" method="post"></form>
Re: Need Help On Html Mailto Form by Nobody: 1:46pm On May 26, 2011
Lawd of mercy! did u not hear that the mailto function is not an advisable thing. At worst, you can look for frontpage method. But using mailto:email will only open outlook express - am outta here before i burn my pc. . .fire is coming out of my nostrils already
Re: Need Help On Html Mailto Form by Nobody: 1:49pm On May 26, 2011
i can write you one with PHP
Re: Need Help On Html Mailto Form by fd4all234(m): 1:54pm On May 26, 2011
@ActiveMan will it work with html cause my page is on html
Re: Need Help On Html Mailto Form by Nobody: 1:56pm On May 26, 2011
YES
we teach you how to set it to work
Re: Need Help On Html Mailto Form by Nobody: 2:17pm On May 26, 2011
DOWNLOAD THIS ZIP FILE
http://up-nigeria.com/Nairaland.zip

open index.php in NOTEPAD to set where you want the email to go.

______________________________________________________________

to execute php on htm or html pages

The way to execute PHP on a .html page is to modify your .htaccess file. This file may be hidden, so depending upon your FTP program you may have to modify some settings to see it. Then you just need to add this line for .html:

AddType application/x-httpd-php .html

Or for .htm

AddType application/x-httpd-php .htm

If you only plan on including the PHP on one page, it is better to setup this way:

<Files yourpage.html>
AddType application/x-httpd-php .html
</Files>

This code will only make the PHP executable on the yourpage.html file, and not on all of your html pages.

Things to watch out for:

    * If you have an existing .htaccess file, add this to it, do not overwrite it or other settings may stop working! Always be very careful with your .htaccess file and ask your host if you need help
    * Anything in your .html files that starts with <? will now be executed as PHP, so if it's in your file for some other reason (an XML tag for example) you will need to echo these lines to prevent errors. For example:

      <?php echo '<?xml version="1.0" encoding="IUTF-8"?>'; ?>


I THINK THIS HELPS
SEE THE SAMPLE HERE
http://up-nigeria.com/nairaland/index.php
Re: Need Help On Html Mailto Form by yawatide(f): 3:15pm On May 26, 2011
1) Is your website/web host PHP-enabled? If yes, then that is the only way that mailto() will work.

Now, back to the basics:

The "action" attribute of a form is where you tell the form to go. If you say "mailto", then it opens the default email client (outlook in most cases). This approach isn't always good as you are assuming the person has outlook installed and uses it. Also, by using mailto, you are exposing your email address to spammers.

Here is an example form opening tag that will enable you to use PHP's mail():
<form method="post" action="thank-you.php">

Note the "action" part. This tells the form to go to thank-you.php where you will insert and use your PHP code. For trial purposes, add a PHP file in a directory of your choosing, add that file and its path (where applicable) to the "action" attribute then in that file, just add "hello world" in HTML. Then go to your form in a browser, fill out any field and hit submit. If you get redirected to the "thank-you.php" page and you see "hello world", then you are in business. If not, either you don't have a linux account or you aren't referencing the file well.

Send us a url where we can see what you have done, along with the code you are using.

Good luck!
Re: Need Help On Html Mailto Form by fd4all234(m): 10:23pm On May 26, 2011
is it from my cpanel i would do this or with notepad, cauuse am so confuse, please if u can take it step-by-step in other for me to understand it very well, with all the tutorials post here i dont ever knw were to start from,
Re: Need Help On Html Mailto Form by yawatide(f): 10:27pm On May 26, 2011
your code will have to be written in your text editor of choice, be it notepad or dreamweaver. You then upload it to your server via ftp or uploading in your cpanel.

Let's do this: Paste your code here and then we take it from there wink
Re: Need Help On Html Mailto Form by fd4all234(m): 10:38pm On May 26, 2011
below is the code i just write,

<form name="frmRegister" method="post" action="http://frisahost.com/register_process2.php" onsubmit="return Registerform()">
<table align="left" border="0" width="500">
<tr>
<td colspan="2" align="left">Use this form to contact us and be
free to ask any question you want to ask . </td>
</tr>
<tr>
<td align="left" width="147"><b>
<font color="#000000" face="verdana, arial" size="-1">First Name:</font><font color="#ff0000">*</font></b>&nbsp;&nbsp;</td>
<td align="left" width="343">
<input name="FirstName" value type="text" size="20"></td>
</tr>
<!--<tr>
<td align="right" ><b><font face="verdana, arial" size="-1">Last Name:</font></b><font face="verdana, arial" size="-1"><b><font face="verdana, arial" size="-1"><font color="#FF0000">*</font></font></b>&nbsp;&nbsp;</font></td>
<td align="left"><input type="text" name="LastName" value="" /></td>
</tr>-->
<tr>
<td align="right">
<div align="left">
<b><font face="verdana, arial" size="-1"><span class="black1">
Other Names</span>:</font></b><font face="verdana, arial" size="-1"><b><font color="#ff0000">*</font></b>&nbsp;&nbsp;</font></div>
</td>
<td align="left"><input name="oName" size="28" value type="text"></td>
</tr>
<tr>
<td align="right">
<div align="left">
<span class="black1"><b><font face="verdana, arial" size="-1">
Email</font></b></span><b><font face="verdana, arial" size="-1"><span class="style1">:</span><span class="black1"><font color="#ff0000">*</font></span></font></b><span class="black1">&nbsp;&nbsp;</span></div>
</td>
<td align="left"><span class="black1">
<input name="Email" size="28" value type="text"></span></td>
</tr>
<tr>
<td align="right">
<div align="left">
<span class="black1"><b><font face="verdana, arial" size="-1">
Phone:<font color="#ff0000">*</font></font></b>&nbsp;&nbsp;</span></div>
</td>
<td align="left"><span class="black1">
<input name="Phone" size="28" value type="text"></span></td>
</tr>
<tr>
<td align="right">
<div align="left">
<span class="black1"><b><font face="verdana, arial" size="-1">
Message:</font></b>&nbsp;&nbsp;&nbsp;<b><font color="#ff0000" face="verdana, arial" size="-1">*</font></b>&nbsp;</span></div>
</td>
<td><span class="black1">
<textarea name="Message" cols="40" rows="6"></textarea> </span>
</td>
</tr>
<tr>
<td align="right">&nbsp;</td>
<td><span class="black1">&nbsp;
<input name="Submit" style="width: 200px; height: 33px; z-index: 1; background-color: rgb(236, 236, 236); color: rgb(0, 0, 102); font-weight: bold;" onclick="return Registerform()" type="Submit"></span></td>
</tr>
</table>
</form>
Re: Need Help On Html Mailto Form by Nobody: 9:22am On May 27, 2011
i can do it for you if you dont mind.
Re: Need Help On Html Mailto Form by fd4all234(m): 10:38am On May 27, 2011
@ActiveMan here is the code i wrote

<form name="frmRegister" method="post" action="http://frisahost.com/register_process2.php" onsubmit="return Registerform()">

i want to ask, if any body should fill the form,were will it be mail to and how will i get to read the mail.

2nd, after creating the form,i dont fill it and i just click on submit then he submit, how will i could it to make it not to submit if the form is not filled.

here is the link to the form
http://frisahost.com/contactform.html
Re: Need Help On Html Mailto Form by yawatide(f): 12:17pm On May 27, 2011
1) We need to see the contents of process_2.php
2) We need to see the contents of the javascript fxn u r calling "onsubmit"
Re: Need Help On Html Mailto Form by Nobody: 12:20pm On May 27, 2011
I don bring out biro and paper plus ipad too, buuuuh the form is still not summiting jor? [s][/s]
Re: Need Help On Html Mailto Form by fd4all234(m): 12:21pm On May 27, 2011
@yawa-ti-de i dont mind if u can help me correct the code
Re: Need Help On Html Mailto Form by fd4all234(m): 12:25pm On May 27, 2011
@*dhtml i dont mind if u can help me correct the code



<form name="frmRegister" method="post" action="http://frisahost.com/register_process2.php" onsubmit="return Registerform()">
<td align="left" width="147"><b>
<font color="#000000" face="verdana, arial" size="-1">First Name:</font><font color="#ff0000">*</font></b>&nbsp;&nbsp;</td>

<td align="left" width="343">
<input name="FirstName" value type="text" size="20"></td>
</tr>
<!--<tr>
<td align="right" ><b><font face="verdana, arial" size="-1">Last Name:</font></b><font face="verdana, arial" size="-1"><b><font face="verdana, arial" size="-1"><font color="#FF0000">*</font></font></b>&nbsp;&nbsp;</font></td>
<td align="left"><input type="text" name="LastName" value="" /></td>
</tr>-->
<tr>
<td align="right">
<div align="left">
<b><font face="verdana, arial" size="-1"><span class="black1">
Other Names</span>:</font></b><font face="verdana, arial" size="-1"><b><font color="#ff0000">*</font></b>&nbsp;&nbsp;</font></div>

</td>
<td align="left"><input name="oName" size="28" value type="text"></td>
</tr>
<tr>
<td align="right">
<div align="left">
<span class="black1"><b><font face="verdana, arial" size="-1">
Email</font></b></span><b><font face="verdana, arial" size="-1"><span class="style1">:</span><span class="black1"><font color="#ff0000">*</font></span></font></b><span class="black1">&nbsp;&nbsp;</span></div>

</td>
<td align="left"><span class="black1">
<input name="Email" size="28" value type="text"></span></td>
</tr>
<tr>
<td align="right">
<div align="left">
<span class="black1"><b><font face="verdana, arial" size="-1">
Phone:<font color="#ff0000">*</font></font></b>&nbsp;&nbsp;</span></div>

</td>
<td align="left"><span class="black1">
<input name="Phone" size="28" value type="text"></span></td>
</tr>
<tr>
<td align="right">
<div align="left">
<span class="black1"><b><font face="verdana, arial" size="-1">
Message:</font></b>&nbsp;&nbsp;&nbsp;<b><font color="#ff0000" face="verdana, arial" size="-1">*</font></b>&nbsp;</span></div>

</td>
<td><span class="black1">
<textarea name="Message" cols="40" rows="6"></textarea> </span>
</td>
</tr>
<tr>
<td align="right">&nbsp;</td>
<td><span class="black1">&nbsp;<p>

<input name="Submit" style="width: 200px; height: 33px; z-index: 1; background-color: rgb(236, 236, 236); color: rgb(0, 0, 102); font-weight: bold;" onclick="return Registerform()" type="Submit"></span></td>

</form>
Re: Need Help On Html Mailto Form by mxxpunkxx: 2:12pm On May 27, 2011
na wa o, help dis dude out na, it only takes some seconds

@OP

send me the php code that's giving your error (as notepad attachment) . .

i will correct it and send back to you as .php file, and upload it to your server as-is

charlescutt@yahoo.com
Re: Need Help On Html Mailto Form by mxxpunkxx: 2:16pm On May 27, 2011
and dont forget to put this line of code in the page that has the form

<form action="Bleep.php" method="POST">

replace Bleep.php with the name of your php file . . . . .

and if your host supports php, it should send e'thin straight to the email address configured in the php file . . .

no outlook!
Re: Need Help On Html Mailto Form by yawatide(f): 3:14pm On May 27, 2011
mxx: if you noticed my last post, I explicitly asked to see the code.  It would have been easy to contact him privately or do as you did and ask him to email the code to you.  Doing so wouldn't help him or others who will learn from it.

I started off telling him what to do but based on response, I have concluded that he needs to start from "A", which to me means, let us see both files.  From there, I don't mind holding his hands to ensure that the code works in the end.

At the end of the day, I want to teach him how to fish and not just give him fish.
Re: Need Help On Html Mailto Form by mxxpunkxx: 4:10pm On May 27, 2011
i feel ya

but if there is a millisecond delay in eating the fish;

mxxpunkxx is here to force the fish into his mouth
Re: Need Help On Html Mailto Form by DualCore1: 4:59pm On May 27, 2011
someone should teach *dhtml how to get babes and stop giving him babes grin
Re: Need Help On Html Mailto Form by Nobody: 10:18pm On May 27, 2011
Dual Core:

someone should teach *dhtml how to get babes and stop giving him babes grin
you can kindly do the honour. . .iyam all ears
Re: Need Help On Html Mailto Form by fd4all234(m): 11:03pm On May 27, 2011
@mxxpunkxx i have just sent the form in noted to ur email, i would be so oblige to hear from u again, secondly how will i configure my php so i can see the mail.
Re: Need Help On Html Mailto Form by yawatide(f): 1:29am On May 28, 2011
fd4: Thanks for sharing the code. I guess it got gobbled up by the bot the last time cos I didn't see it.

1) I see the html, which is fine.
2) I see an onsubmit function. Paste the code for the function you are calling (registerform())
3) paste the code for http://frisahost.com/register_process2.php

(1) (2) (Reply)

Change Your To .com / Syskay Domain Purchase Complaint / Encylopedic List Of Blog Niche And Topic Idea List

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 69
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.