View Full Version : Create a Send Email Form
ssdt
October 18th, 2007, 22:17
Hey,
I want to create a send e-mail form for my website. It is just like the Contract Us forms found in many websites. For some special reasons, I have to create it in another language then English. I would prefer to use HTML to create the form but I know it is better to use PHP. So if anyone gave me the code in HTML or PHP, it would be really appreciated.
Pauly
October 19th, 2007, 10:21
Moved thread :)
ssdt
October 19th, 2007, 22:16
moved to where?
the_pm
October 21st, 2007, 00:39
moved to where?Moved to right where it is right now ;)
PHP is the mechanism that allows your form to be processed. HTML is the front end of the form. Language shouldn't be an issue with forms. What have you tried up to this point, and what's gone wrong?
ssdt
October 21st, 2007, 21:39
If PHP is the best, then what is the best way to create a PHP email form? What's the code and all the stuffs?
ssdt
October 23rd, 2007, 22:14
Please you know how to create a system like that, then I would have a great website. You can just give me the form for english and then I will change the font to the language I want.
Thanks in advance....
ssdt
October 23rd, 2007, 22:22
Moved to right where it is right now ;)
PHP is the mechanism that allows your form to be processed. HTML is the front end of the form. Language shouldn't be an issue with forms. What have you tried up to this point, and what's gone wrong?
I have this from emailmeform.com
<form method="post" action="http://www.emailmeform.com/fid.php?formid=9125">
<INPUT TYPE=hidden NAME=FCode VALUE="atmp929j">
<table cellpadding="2" cellspacing="0" border="0" bgcolor="#FFFFFF">
<tr>
<td>
<font face="Verdana" size="2" color="#000000">Type Your Suggestions and Criticisations Here: </font>
<div style="" id="mainmsg"> </div>
</td>
</tr>
</table>
<br>
<table cellpadding="2" cellspacing="0" border="0" bgcolor="#FFFFFF">
<tr valign="top">
<td nowrap><font face="Verdana" size="2" color="#000000">Your Name</font></td>
<td>
<input type="text" name="FieldData0" value="" maxlength="100" size="30"> </td>
</tr>
<tr valign="top">
<td nowrap><font face="Verdana" size="2" color="#000000">Your Email Address</font></td>
<td>
<input type="text" name="FieldData1" value="" maxlength="100" size="30"> </td>
</tr>
<tr valign="top">
<td nowrap><font face="Verdana" size="2" color="#000000">Massage</font></td>
<td>
<textarea name="FieldData2" cols="60" rows="10"></textarea><br> </td>
</tr>
<tr>
<td colspan="2">
</td>
</tr>
<tr>
<td> </td>
<td align="middle">
<input type="text" name="hida2" value="" maxlength="100" size="3" style="display : none;">
<input type="submit" class="btn" value="Send IT!!!" name="Submit"> <input type="reset" class="btn" value=" Clear " name="Clear"></td>
</tr>
<tr>
<td colspan=2 align="center">
<br>
<div style="position:absolute; top:449px; right:1375px;"><b>PDF Printer</b><br>PDF Writer Pro is a software tool that install itself as a <a href="http://www.amicutilities.com/pdf-writer/">pdf printer</a> and converts any files printed to it to pdfs</div></td>
</tr>
</table>
</form>
I have looked at it but I have not found the word font face or anything to do with font for the form. I have found font face for some texts but nothing else than that. Now I want to add this Bangla font in that place. The font could be found here (http://omicronlab.com/download/fonts/Bangla.ttf).
But I can't find the font for the form. If anyone finds it, just highlight it for me and that's all I want.
Thanks....
Danny
October 24th, 2007, 00:50
Hi,
If im reading correctly, you are trying to change the font for the form so it appears differently on your website.
As far as I am aware you would need to edit the CSS file giving the td and tr elements names and then assigning different font styles to them as necessary. If you are unfamiliar with this you would have a trawl through the w3c site or maybe someone here could help you if you could explain exactly where you are struggling and what you have tried.
However, I don't believe 'Bangla' is a default windows/mac font therefore you would have to use sIFR to replace the standard font with a custom one such as 'Bangla'. You can find loads of tutorials for sIFR just by searching for it on Google.
Hope this points you in the right direction.
the_pm
October 24th, 2007, 16:46
Character encoding can get a bit dicey, so let me see if I can get this right.
If you simply type your text into the page using the Bangla font, and the Bangla font uses Unicode characters (I'm not sure about this part), then making your character set UTF-8, publishing the page as a UTF-8 document and ensuring your server serves it up properly should allow you to use the text you desire.
"Should" is the operative word. I'm not 100% sure here...
ssdt
October 24th, 2007, 22:48
This is the code of the form I am going to use for the bangla font. But the thing is that I have the code and for the code, I needed some javascript files that are already installed in my web server. Here is the code for just the form. But I want to know how to make it a email form.
<form>
<textarea name="bangla" id="bangla" cols="80" rows="10" onfocus="" style="font-family:vrinda; font-size: 20px; width: 400px; height: 100px;" ></textarea>
<br/>
<input type="button" onclick="switched=!switched;" value="switch keyboard mode" />
</form>
The font used here is called vrinda, if you look closely at it, you will be able to find it. Just give me the code of the submit button of the email.
Thanks.....
If you want to check the form out without any email system, click here (http://phpxperts.net/phonetic/example.html).
ssdt
October 29th, 2007, 22:03
could anyone tell me about this form???
Tjobbe
October 30th, 2007, 15:03
could anyone tell me about this form???
ssdt, I'm going to try and be as polite as I can about this, please do not take it the wrong way.
First,a simplification of the process:
A "Send Email Form" works in two parts, one part being the <form>, which includes the text fields and the button you would click to "send" it.
The second part of the form is the php side which physically processes the data from this form and decides what should be done with it.
The page with the form on it does not have to be in php, it can be html, htm or whatever.
Now, for the "font-face".
The font-face, or "font-family" as it is referred to in a CSS document, is what you would edit if you wanted to change the way a word is displayed on the screen.
I don't recommend you use "Bangla" as your font, as it is very unlikely that everyone will have that font installed on their computer. To be able to view any given font, you need to have it installed on your computer, if you don't have a spcified font installed on your computer, it is likely that you will see Times New Roman instead.
A CSS File, similar to this one: http://www.sitecreative.net/style/style.css contains information such as font family, font size, colours, background images etc.
To specify a font for the WHOLE web page, do NOT use font-face in your html file, simply attach a css file to your Web page and define it in your style sheet, like I have done for the body {} tag.
For the php send email form, I suggest you use google, try terms such as "simple php sendmail form" or "php email form" and see what you come up with.
The way you are asking things makes it look like you can not be bothered to find out any information for yourself, or at least attempt to learn html or CSS, which are relatively basic.
ssdt
October 30th, 2007, 22:00
I got this code when I searched simple php send email form. I guess this is good for my use.
<html>
<head><title>PHP Mail Sender</title></head>
<body>
<?php
/* All form fields are automatically passed to the PHP script through the array $HTTP_POST_VARS. */
$email = $HTTP_POST_VARS['email'];
$subject = $HTTP_POST_VARS['subject'];
$message = $HTTP_POST_VARS['message'];
/* PHP form validation: the script checks that the Email field contains a valid email address and the Subject field isn't empty. preg_match performs a regular expression match. It's a very powerful PHP function to validate form fields and other strings - see PHP manual for details. */
if (!preg_match("/\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/", $email)) {
echo "<h4>Invalid email address</h4>";
echo "<a href='javascript:history.back(1);'>Back</a>";
} elseif ($subject == "") {
echo "<h4>No subject</h4>";
echo "<a href='javascript:history.back(1);'>Back</a>";
}
/* Sends the mail and outputs the "Thank you" string if the mail is successfully sent, or the error string otherwise. */
elseif (mail($email,$subject,$message)) {
echo "<h4>Thank you for sending email</h4>";
} else {
echo "<h4>Can't send email to $email</h4>";
}
?>
</body>
</html>
The thing is that I am new to PHP but I have been using HTML for 3 or more years. In the code i cannot see any font face (if they do not use font face to tell the name of the font, then please correct me). I also thought that PHP codes start with <?php> and end with <?> but I don't see those here.
This code is from about.com-
<?php
$to = "you@yoursite.com";
$subject = "Contact Us";
$email = $_REQUEST['email'] ;
$message = $_REQUEST['message'] ;
$headers = "From: $email";
$sent = mail($to, $subject, $message, $headers) ;
if($sent)
{print "Your mail was sent successfully"; }
else
{print "We encountered an error sending your mail"; }
?>
This looks correct to me. But is it all that?
For about.com, I also got all these codes-
mail ( "me@mysite.com", "Contact Us Form", "This is an email from your site", "From: you@yoursite.com" )
<form method="post" action="contact.php">
Email: <input name="email" type="text"><br>
Message:<br>
<textarea name="message" rows="15" cols="40"></textarea><br>
<input type="submit">
</form>
Which one do I use? And for different language, I can use Vrinda which is used in this website (http://datta.quotaless.com/webmaster/index.html).
So, I want to combine the form in that website and the buttons to send the email itself.
Thanks............
ssdt
October 30th, 2007, 22:24
Hi,
If im reading correctly, you are trying to change the font for the form so it appears differently on your website.
As far as I am aware you would need to edit the CSS file giving the td and tr elements names and then assigning different font styles to them as necessary. If you are unfamiliar with this you would have a trawl through the w3c site or maybe someone here could help you if you could explain exactly where you are struggling and what you have tried.
However, I don't believe 'Bangla' is a default windows/mac font therefore you would have to use sIFR to replace the standard font with a custom one such as 'Bangla'. You can find loads of tutorials for sIFR just by searching for it on Google.
Hope this points you in the right direction.
I know that Bangla is not a default font found in MAC or WINDOWS.
This (http://datta.quotaless.com/webmaster/vrinda.ttf) can also be the font. The thing is that, it is for the persons who wants to create the account in the website will have to download it and then install it in his or her computer. So it is for only some people. I just want to create the form and I am using this font because this fon is phonetic. So, if you go to http://teacher.scholastic.com/writeit/publish.asp, I want to create a form just like that but, I see that this form is asp which I do not want.
I got this code form HTML basix, I guess this is the one I was looking for if it works.
<form action="mailto:youremail@yourdomain.com?subject=Story" method="post" enctype="text/plain">
<table><tr><td>
<TEXTAREA NAME="Type It Here" ROWS=10 COLS=10></TEXTAREA><BR>
</td></tr>
<tr><td align=center>
<INPUT TYPE="submit" value="Send It!" style="color: #ffffff; background-color: #000000">
</td></tr></table>
</FORM>
For the <textarea> again,. their is no code for font face. So what should I do???
This (http://www.stadtaus.com/en/php_scripts/formmail_script/) website gave me a zip file where is a email form and there are some languages like Polish, German, Spanish, Hungarian and many more. I have a js file for the encoding. Here (http://datta.quotaless.com/webmaster/phoneticunicode.js) it is.
Do I have to just add this js file in the languages section or do I have to change some of the codes too?
Thanks.................
[NOTE] THERE ARE SOME HTACCESS FILES I FOUND IN THE .ZIP WHICH I DOWNLOADED BUT YOU CAN'T OPEN THAT FILE. CAN YOU OPEN THAT FILE TOO?
ssdt
November 3rd, 2007, 00:56
could anyone please help me???
inimino
November 3rd, 2007, 01:50
This may help you:
http://www.catb.org/~esr/faqs/smart-questions.html
At this point it's unclear what exactly you are trying to accomplish and what you have tried.
Tjobbe
November 3rd, 2007, 14:36
This may help you:
http://www.catb.org/~esr/faqs/smart-questions.html
To Quote from that:
1. Try to find an answer by searching the archives of the forum you plan to post to.
2. Try to find an answer by searching the Web.
3. Try to find an answer by reading the manual.
4. Try to find an answer by reading a FAQ.
5. Try to find an answer by inspection or experimentation.
To help you one more time, download this zip file: http://www.dbmasters.net/files/formmailer.zip , read the manual. (in the DOCS folder - the index file) If you can not get it to work after reading the manual, get another hobby.
ssdt
November 3rd, 2007, 17:37
To Quote from that:
1. Try to find an answer by searching the archives of the forum you plan to post to.
2. Try to find an answer by searching the Web.
3. Try to find an answer by reading the manual.
4. Try to find an answer by reading a FAQ.
5. Try to find an answer by inspection or experimentation.
To help you one more time, download this zip file: http://www.dbmasters.net/files/formmailer.zip , read the manual. (in the DOCS folder - the index file) If you can not get it to work after reading the manual, get another hobby.
Thanks
alton100
June 22nd, 2011, 06:47
Thanks for sharing this information. I really like your way of expressing the opinions and sharing the information. It is good to move as chance bring new things in life, paves the way for advancement, etc. But it is well known to everyone that moving to new location with bulk of goods is not an easy task to move or shift from one place to other place because I have experienced about that and I face the problem like that. There I go to village near to my city faced that problem there.
E20-322 (http://www.certidea.eu/E20-322-exam.html) \\ 650-295 (http://www.certidea.eu/650-295-exam.html) \\ HP0-J51 (http://www.certidea.eu/HP0-J51-exam.html) \\ 646-656 (http://www.certidea.eu/646-656-exam.html) \\ PMI-002 (http://www.certidea.eu/PMI-002-exam.html) \\ HP0-Y31 (http://www.certidea.eu/HP0-Y31-exam.html) \\ 156-915.71 (http://www.certidea.eu/156-915.71-exam.html) \\ 642-681 (http://www.certidea.eu/642-681-exam.html) \\ 642-971 (http://www.certidea.eu/642-971-exam.html) \\ 70-682 (http://www.certidea.eu/70-682-exam.html)
vBulletin® v3.6.8, Copyright ©2000-2012, Jelsoft Enterprises Ltd.