Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 06-13-2006, 01:42 PM Form Mail Script
sparshpolly's Avatar
Extreme Talker

Posts: 178
Name: Sparsh
Location: India
Trades: 0
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.
sparshpolly is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 06-15-2006, 11:15 AM Re: Form Mail Script
Junior Talker

Posts: 4
Name: Alexander
Trades: 0
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/
crazed is offline
Reply With Quote
View Public Profile
 
Old 06-15-2006, 11:25 AM Re: Form Mail Script
sparshpolly's Avatar
Extreme Talker

Posts: 178
Name: Sparsh
Location: India
Trades: 0
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.
sparshpolly is offline
Reply With Quote
View Public Profile
 
Old 06-15-2006, 12:34 PM Re: Form Mail Script
Novice Talker

Posts: 9
Trades: 0
This one is simple and most important secure. We use it.

http://www.dbmasters.net/index.php?id=19
WebzPro is offline
Reply With Quote
View Public Profile
 
Old 06-15-2006, 02:11 PM Re: Form Mail Script
sparshpolly's Avatar
Extreme Talker

Posts: 178
Name: Sparsh
Location: India
Trades: 0
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.
sparshpolly is offline
Reply With Quote
View Public Profile
 
Old 06-21-2006, 02:38 PM Re: Form Mail Script
Novice Talker

Posts: 9
Trades: 0
Just wondering that script worked out for you?
WebzPro is offline
Reply With Quote
View Public Profile
 
Old 07-06-2006, 01:52 AM Re: Form Mail Script
sparshpolly's Avatar
Extreme Talker

Posts: 178
Name: Sparsh
Location: India
Trades: 0
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.
sparshpolly is offline
Reply With Quote
View Public Profile
 
Old 07-07-2006, 03:21 AM Re: Form Mail Script
nabil_kadimi's Avatar
Experienced Talker

Posts: 42
Name: nabil
Trades: 0
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..
nabil_kadimi is offline
Reply With Quote
View Public Profile
 
Old 07-07-2006, 03:58 AM Re: Form Mail Script
sparshpolly's Avatar
Extreme Talker

Posts: 178
Name: Sparsh
Location: India
Trades: 0
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.
sparshpolly is offline
Reply With Quote
View Public Profile
 
Old 07-07-2006, 10:42 AM Re: Form Mail Script
nabil_kadimi's Avatar
Experienced Talker

Posts: 42
Name: nabil
Trades: 0
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>";
}
}
?>
nabil_kadimi is offline
Reply With Quote
View Public Profile
 
Old 07-08-2006, 09:39 AM Re: Form Mail Script
Extreme Talker

Posts: 170
Name: XpIndia.Com
Trades: 0
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.
__________________

Please login or register to view this content. Registration is FREE

Server alert/reseller-
Please login or register to view this content. Registration is FREE
XpIndia.Com is offline
Reply With Quote
View Public Profile
 
Old 07-08-2006, 11:12 AM Re: Form Mail Script
sparshpolly's Avatar
Extreme Talker

Posts: 178
Name: Sparsh
Location: India
Trades: 0
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>&nbsp;</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.
sparshpolly is offline
Reply With Quote
View Public Profile
 
Old 07-08-2006, 11:40 AM Re: Form Mail Script
Extreme Talker

Posts: 170
Name: XpIndia.Com
Trades: 0
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">&nbsp;</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">&nbsp;
<?
$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>");
}
?>
__________________

Please login or register to view this content. Registration is FREE

Server alert/reseller-
Please login or register to view this content. Registration is FREE
XpIndia.Com is offline
Reply With Quote
View Public Profile
 
Old 07-08-2006, 11:43 AM Re: Form Mail Script
Extreme Talker

Posts: 170
Name: XpIndia.Com
Trades: 0
using the form you posted, I sent an email to you spars, pl check if you get it.
__________________

Please login or register to view this content. Registration is FREE

Server alert/reseller-
Please login or register to view this content. Registration is FREE
XpIndia.Com is offline
Reply With Quote
View Public Profile
 
Old 07-11-2006, 02:47 PM Re: Form Mail Script
sparshpolly's Avatar
Extreme Talker

Posts: 178
Name: Sparsh
Location: India
Trades: 0
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.
sparshpolly is offline
Reply With Quote
View Public Profile
 
Old 07-11-2006, 02:49 PM Re: Form Mail Script
sparshpolly's Avatar
Extreme Talker

Posts: 178
Name: Sparsh
Location: India
Trades: 0
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.
sparshpolly is offline
Reply With Quote
View Public Profile
 
Old 07-11-2006, 02:58 PM Re: Form Mail Script
Extreme Talker

Posts: 170
Name: XpIndia.Com
Trades: 0
Yes I sent it. So you got the mail. Funny I cant receive it ...
__________________

Please login or register to view this content. Registration is FREE

Server alert/reseller-
Please login or register to view this content. Registration is FREE
XpIndia.Com is offline
Reply With Quote
View Public Profile
 
Old 07-11-2006, 03:12 PM Re: Form Mail Script
sparshpolly's Avatar
Extreme Talker

Posts: 178
Name: Sparsh
Location: India
Trades: 0
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.
sparshpolly is offline
Reply With Quote
View Public Profile
 
Old 07-11-2006, 03:19 PM Re: Form Mail Script
Extreme Talker

Posts: 170
Name: XpIndia.Com
Trades: 0
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.
__________________

Please login or register to view this content. Registration is FREE

Server alert/reseller-
Please login or register to view this content. Registration is FREE

Last edited by XpIndia.Com; 07-11-2006 at 03:34 PM..
XpIndia.Com is offline
Reply With Quote
View Public Profile
 
Old 07-11-2006, 03:23 PM Re: Form Mail Script
sparshpolly's Avatar
Extreme Talker

Posts: 178
Name: Sparsh
Location: India
Trades: 0
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.
sparshpolly is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Form Mail Script

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.65954 seconds with 12 queries