 |
|
|
|
06-13-2006, 01:42 PM
|
Form Mail Script
|
Posts: 178
Name: Sparsh
Location: India
|
Hey people....
I am looking out for a free script to use on the Contact Page of my website.
I havent been successful yet. Could someone please provide a link to a scritp which is simple to configure and integrate with the current form.
Thanks
Sparsh
__________________
Please login or register to view this content. Registration is FREE
Please login or register to view this content. Registration is FREE
We are what we repeatedly do... EXCELLENCE ... then is not a fact but a habit.
|
|
|
|
06-15-2006, 11:15 AM
|
Re: Form Mail Script
|
Posts: 4
Name: Alexander
|
Umm i am not to sure if i can post links on this website but i am knew here just pm if i can.
Here is the link to a website that i used to creat a little join us page for my clan but here try this out worked greate for me
http://www.ibdhost.com/contact/
|
|
|
|
06-15-2006, 11:25 AM
|
Re: Form Mail Script
|
Posts: 178
Name: Sparsh
Location: India
|
am sure you can post links on this site. Thanks anyways
__________________
Please login or register to view this content. Registration is FREE
Please login or register to view this content. Registration is FREE
We are what we repeatedly do... EXCELLENCE ... then is not a fact but a habit.
|
|
|
|
06-15-2006, 02:11 PM
|
Re: Form Mail Script
|
Posts: 178
Name: Sparsh
Location: India
|
Thanks ... ill let you know how simple it is when i use it myself...
__________________
Please login or register to view this content. Registration is FREE
Please login or register to view this content. Registration is FREE
We are what we repeatedly do... EXCELLENCE ... then is not a fact but a habit.
|
|
|
|
06-21-2006, 02:38 PM
|
Re: Form Mail Script
|
Posts: 9
|
Just wondering that script worked out for you?
|
|
|
|
07-06-2006, 01:52 AM
|
Re: Form Mail Script
|
Posts: 178
Name: Sparsh
Location: India
|
I used this very simple script in the end.. The form mailer was good. But I could not figure out how to show the results in the same page and it was a bit long to load .This script is extremely short...
Add this to the form tag
<form method="post" action="<?=$PHP_SELF; ?>">
Then this script follows :
Quote:
<?
$do = ($_POST['do']);
if($do == "send")
{
$recipient = "alchemy.education@gmail.com"; // Set your email here //
$subject = ($_POST['Subject']);
$name = ($_POST['Name']);
$email = ($_POST['Email']);
$message = ($_POST['message']);
mail("$recipient", "$subject", "$message", "From: $email ($name)\r\nReply-to:$email");
echo ("<p>Your message was successfully sent!</p>");
}
?>
|
Note : this script can be used only if the page is saved as a .php extension ... Or paste the script part in another file and use it as an external script..
__________________
Please login or register to view this content. Registration is FREE
Please login or register to view this content. Registration is FREE
We are what we repeatedly do... EXCELLENCE ... then is not a fact but a habit.
|
|
|
|
07-07-2006, 03:21 AM
|
Re: Form Mail Script
|
Posts: 42
Name: nabil
|
See the one on my contact page if you like it, try without typing email or name or message to see how it works
Last edited by nabil_kadimi; 07-07-2006 at 03:22 AM..
|
|
|
|
07-07-2006, 03:58 AM
|
Re: Form Mail Script
|
Posts: 178
Name: Sparsh
Location: India
|
Could you please share your script here. Nice checking feature. But you can check that using Javascript as wel.. and am more interested in a script in showing a custom thanks page .. like yours... nice work
__________________
Please login or register to view this content. Registration is FREE
Please login or register to view this content. Registration is FREE
We are what we repeatedly do... EXCELLENCE ... then is not a fact but a habit.
|
|
|
|
07-07-2006, 10:42 AM
|
Re: Form Mail Script
|
Posts: 42
Name: nabil
|
here is the code, is seems a little messy with some french words,
so feel free to ask your questions
Quote:
<script language="javascript" type="text/javascript">
// function parameters are: field - the string field, count - the field for remaining characters number and max - the maximum number of characters
function CountLeft(field, count, max) {
// if the length of the string in the input field is greater than the max value, trim it
if (field.value.length > max)
field.value = field.value.substring(0, max);
else
// calculate the remaining characters
count.value = max - field.value.length;
}
</script>
<?php
$email_webmaster = "admin@inter-translators.com";//// indiquer votre adresse email /////
if (isset($_POST["envoyer"])){
$etat = "erreur";
if (isset($_POST["email_expediteur"])) {
$_POST["email_expediteur"]=trim(stripslashes($_POST["email_expediteur"]));
}
if (isset($_POST["titre"])) {
$_POST["titre"]=trim(stripslashes($_POST["titre"]));
}
if (isset($_POST["message"])) {
$_POST["message"]=trim(stripslashes($_POST["message"]));
}
if (empty($_POST["email_expediteur"])) {
$erreur="Please fill in the e-mail address field.";
}
elseif (eregi("@inter-translators.com",$_POST["email_expediteur"]) or !eregi("^[0-9a-z]([-_.]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\.[a-z]{2,3}$",$_POST["email_expediteur"])){
$erreur="Invalid e-mail address.";
}
elseif (empty($_POST["titre"])) {
$erreur="Please fill in the name field with your name or your compant name.";
}
elseif (empty($_POST["message"])) {
$erreur="Please fill in the message field.";
}
else {
$etat="ok";
}
}
else {
$etat="attente";
}
if ($etat!="ok"){
if ($etat=="erreur"){
echo "<p style='font-weight:bold;color:#F00;border:solid 1px white; padding-left:5px;padding-bottom:2px'><img src='./images/erreur.gif' width='36' height='36'/><br />".$erreur."</strong></p>";
}
?>
<form method="post" action="<?php echo $_SERVER["PHP_SELF"]; ?>">
<p>You can contact us by sending your message to <a href="mailto:admin@inter-translators.com">admin@inter-translators.com</a> or by filling in the form below:</p>
<br />
<p>
<label for="email_expediteur"> e-mail</label>
<br />
<input name="email_expediteur" type="text" id="email_expediteur" value="<?php
if (!empty($_POST["email_expediteur"])) {
echo htmlspecialchars($_POST["email_expediteur"],ENT_QUOTES);
}
?>" maxlength="50" style="width:272px"/>
</p>
<p>
<label for="titre">Name</label>
<br />
<input name="titre" type="text" id="titre" value="<?php
if (!empty($_POST["titre"])) {
echo htmlspecialchars($_POST["titre"],ENT_QUOTES);
}
?>" maxlength="60" style="width:272px"/>
</p>
<p>
<label for="message">Message</label>
<br />
<textarea name="message" cols="32" rows="8" id="message" onkeydown="CountLeft(this.form.message,this.form.l eft,1000);"
onkeyup="CountLeft(this.form.message,this.form.lef t,1000);"><?php
if (isset($_POST["message"])) {
echo htmlspecialchars($_POST["message"],ENT_QUOTES);
}
?></textarea>
</p>
<p>
<input name="left" type="text" value="1000" maxlength="4" style="width:2.5em;text-align:right" />
</p>
<p>
<input name="envoyer" type="submit" value="Send" style="font-weight:bold; width:285px"/>
</p>
</form>
<?php
}
else {
$entete = "From: ".$_POST["email_expediteur"]." <".$_POST["email_expediteur"].">\n";
$entete .= "MIME-Version: 1.0";
if (@mail($email_webmaster,$_POST["titre"],$_POST["message"],$entete)){
echo "<p>Message sent successfully.<br />";
echo "<a href=\"".$_SERVER["PHP_SELF"]."\">Back to the contact form</a>.</p>";
}
else {
echo "<p><img src='../images/erreur.gif' width='36' height='36'/><br /><span style='color:red;font-weight:bold'>An error occured while sendng your message.</span><br />";
echo "<a href=\"".$_SERVER["PHP_SELF"]."\">Retry...</a></p>";
}
}
?>
|
|
|
|
|
07-08-2006, 09:39 AM
|
Re: Form Mail Script
|
Posts: 170
Name: XpIndia.Com
|
Quote:
|
Originally Posted by sparshpolly
I used this very simple script in the end.. The form mailer was good. But I could not figure out how to show the results in the same page and it was a bit long to load .This script is extremely short...
Add this to the form tag
<form method="post" action="<?=$PHP_SELF; ?>">
Then this script follows :
Note : this script can be used only if the page is saved as a .php extension ... Or paste the script part in another file and use it as an external script..
|
I am getting a blank page. I uploaded as .php file. Can anyone post a working
script code pl.
|
|
|
|
07-08-2006, 11:12 AM
|
Re: Form Mail Script
|
Posts: 178
Name: Sparsh
Location: India
|
Did you create a form?
and do let me know the link of the page....
the exact code used as on my website is ....
Quote:
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<form method="post" action="<?=$PHP_SELF; ?>">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="14%"><strong>Name</strong></td>
<td width="86%"><input name="Name" type="text" id="Name" size="30"></td>
</tr>
<tr>
<td><strong>Email</strong></td>
<td><input name="Email" type="text" id="Email" size="30"></td>
</tr>
<tr>
<td><strong>Subject</strong></td>
<td><input name="Subject" type="text" id="Subject" size="30"></td>
</tr>
<tr>
<td valign="middle"><strong>Query</strong></td>
<td><textarea name="message" cols="23" id="Query"></textarea></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" name="Submit" value="Submit">
<input type="reset" name="Submit2" value="Reset">
<input type="hidden" name="do" value="send" /></td>
</tr>
</table>
</form></td>
</tr>
</table>
<?
$do = ($_POST['do']);
if($do == "send")
{
$recipient = "alchemy.education@gmail.com"; // Set your email here //
$subject = ($_POST['Subject']);
$name = ($_POST['Name']);
$email = ($_POST['Email']);
$message = ($_POST['message']);
mail("$recipient", "$subject", "$message", "From: $email ($name)\r\nReply-to:$email");
echo ("<p>Your message was successfully sent!</p>");
}
?>
|
Remember I told you this is .php page. Still doesnt mean you dont open and close your html tags.... The first line should be <html> and the last </html>
Send me the link and the code and also let me know if this post solved your problem
Cheers
Sparsh
__________________
Please login or register to view this content. Registration is FREE
Please login or register to view this content. Registration is FREE
We are what we repeatedly do... EXCELLENCE ... then is not a fact but a habit.
|
|
|
|
07-08-2006, 11:40 AM
|
Re: Form Mail Script
|
Posts: 170
Name: XpIndia.Com
|
It says email sent, but still I am not getting the email. Pl have a look.
Below is the code
Code:
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<form method="post" action="<?=$PHP_SELF; ?>">
<table width="620" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="163">
<p align="center"><strong>Name</strong></td>
<td width="457">
<p align="center"><input name="Name" type="text" id="Name" size="47"></td>
</tr>
<tr>
<td width="163">
<p align="center"><strong>Email</strong></td>
<td width="457">
<p align="center"><input name="Email" type="text" id="Email" size="47"></td>
</tr>
<tr>
<td width="163">
<p align="center"><strong>Subject</strong></td>
<td width="457">
<p align="center"><input name="Subject" type="text" id="Subject" size="47"></td>
</tr>
<tr>
<td valign="middle" width="163">
<p align="center"><strong>Query</strong></td>
<td width="457">
<p align="center"><textarea name="message" cols="40" id="Query" rows="1"></textarea></td>
</tr>
<tr>
<td width="163">
<p align="center"> </td>
<td width="457">
<p align="center"><input type="submit" name="Submit" value="Submit">
<input type="reset" name="Submit2" value="Reset">
<input type="hidden" name="do" value="send" /></td>
</tr>
</table>
</form></td>
</tr>
</table>
<p align="center">
<p align="center">
<?
$do = ($_POST['do']);
if($do == "send")
{
$recipient = "support@xpindia.com"; // Set your email here //
$subject = ($_POST['Subject']);
$name = ($_POST['Name']);
$email = ($_POST['Email']);
$message = ($_POST['message']);
mail("$recipient", "$subject", "$message", "From: $email ($name)\r\nReply-to:$email");
echo ("<p><b>Your message was successfully sent to Support Team!<br>
You will receive response from our support team soon...<br>
Thank You and Have a Super Day!!
</b></p>");
}
?>
|
|
|
|
07-08-2006, 11:43 AM
|
Re: Form Mail Script
|
Posts: 170
Name: XpIndia.Com
|
using the form you posted, I sent an email to you spars, pl check if you get it.
|
|
|
|
07-11-2006, 02:47 PM
|
Re: Form Mail Script
|
Posts: 178
Name: Sparsh
Location: India
|
did you send me the form with no information in it... or the one with only 00000 in it ?
__________________
Please login or register to view this content. Registration is FREE
Please login or register to view this content. Registration is FREE
We are what we repeatedly do... EXCELLENCE ... then is not a fact but a habit.
|
|
|
|
07-11-2006, 02:49 PM
|
Re: Form Mail Script
|
Posts: 178
Name: Sparsh
Location: India
|
I think the email must have reached you.. It takes some time for it to come in your mailbox.your code seems fine to me...
__________________
Please login or register to view this content. Registration is FREE
Please login or register to view this content. Registration is FREE
We are what we repeatedly do... EXCELLENCE ... then is not a fact but a habit.
|
|
|
|
07-11-2006, 02:58 PM
|
Re: Form Mail Script
|
Posts: 170
Name: XpIndia.Com
|
Yes I sent it. So you got the mail. Funny I cant receive it ...
|
|
|
|
07-11-2006, 03:12 PM
|
Re: Form Mail Script
|
Posts: 178
Name: Sparsh
Location: India
|
try with another email address in it........ and are you awake at this time of the night.... Are you a professional ?
__________________
Please login or register to view this content. Registration is FREE
Please login or register to view this content. Registration is FREE
We are what we repeatedly do... EXCELLENCE ... then is not a fact but a habit.
|
|
|
|
07-11-2006, 03:19 PM
|
Re: Form Mail Script
|
Posts: 170
Name: XpIndia.Com
|
Quote:
|
Originally Posted by sparshpolly
try with another email address in it........ and are you awake at this time of the night.... Are you a professional ?
|
Yes I spend 6 to 18hours a day online doing work, sites, helping people around the net , surfing google for useful data.
I am a self made professional, coder.
You can see my small works here
http://www.invisionmodding.com/forum...hp?tutorial=73
http://www.invisionmodding.com/forum...hp?tutorial=72
http://www.invisionmodding.com/forum...p?download=139
http://www.invisionmodding.com/forum...8234&hl=backup
http://tools.invisionize.com/db/index.php/f/6204
Plus I do database restore, mods installation, move them to new servers, sql repair etc, provide server sevurity professionally, etc
i mean huge databases upto >500gb size , and that also
when no one is willing to help someone. 
Last edited by XpIndia.Com; 07-11-2006 at 03:34 PM..
|
|
|
|
07-11-2006, 03:23 PM
|
Re: Form Mail Script
|
Posts: 178
Name: Sparsh
Location: India
|
so which part of india do you belong to...
__________________
Please login or register to view this content. Registration is FREE
Please login or register to view this content. Registration is FREE
We are what we repeatedly do... EXCELLENCE ... then is not a fact but a habit.
|
|
|
|
|
« Reply to Form Mail Script
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|