/    Sign up×
Community /Pin to ProfileBookmark

I know this is a pretty basic question, but I want a script that will users can put their name, email address, question etc in a form and have it emailed to me. I can only find ones that use the users email client to send it.

to post a comment
HTML

13 Comments(s)

Copy linkTweet thisAlerts:
@ray326May 20.2005 — What language support do you have on the server? There are tons of Perl CGI scripts to do this.
Copy linkTweet thisAlerts:
@lonelystarMay 21.2005 — many cpanel has the script aready installed.
Copy linkTweet thisAlerts:
@dz_boyMay 21.2005 — For a simple HTML way of doing it, without PHP, try MailForm:

http://www.mcfedries.com/MailForm/registration.asp
Copy linkTweet thisAlerts:
@ray326May 21.2005 — For a simple HTML way of doing it, without PHP, try MailForm:[/QUOTE]
Yes, outsourcing a simple service like this is often the best way to go as long as the outsource process is flexible enough for your needs.
Copy linkTweet thisAlerts:
@netNITCHMay 21.2005 — [U][B]Use Javascript:



Insert this between the Head tags[/B]
[/U]


<SCRIPT language="JavaScript" type="text/javascript">

<!--

function emailData ( ) {

window.location = ("mailto:[email protected]?subject=Contact Form%20Information&body=" +

"Company:%20%20" + document.frmMain.company.value + escape('n') + escape('n') +

"Address:%20%20" + document.frmMain.address.value + escape('n') + escape('n') +

"City:%20%20" + document.frmMain.city.value + escape('n') + escape('n') +

"State/Prov:%20%20" + document.frmMain.state.value + escape('n') + escape('n') +

"Country:%20%20" + document.frmMain.country.value + escape('n') + escape('n') +

"Zip/Post%20Code:%20%20" + document.frmMain.zip.value + escape('n') + escape('n') +

"Phone:%20%20" + document.frmMain.phone.value + escape('n') + escape('n') +

"Fax:%20%20" + document.frmMain.fax.value + escape('n') + escape('n') +

"Email:%20%20" + document.frmMain.email.value + escape('n') + escape('n') +

"Contact:%20%20" + document.frmMain.contact.value + escape('n') + escape('n') +

"Services%20Requested:%20%20" + document.frmMain.service.value

) ;

}// emailData

function MM_swapImgRestore() { //v3.0

var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;

}



function MM_preloadImages() { //v3.0

var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();

var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)

if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}

}



function MM_findObj(n, d) { //v4.0

var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {

d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}

if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];

for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);

if(!x && document.getElementById) x=document.getElementById(n); return x;

}



function MM_swapImage() { //v3.0

var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)

if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}

}

//-->

</SCRIPT>



[U][B]Use this sample Form[/B][/U]



<TD height="246""center valign="top" colspan="3"">

<FORM name="frmMain" method="post">

<P align="left"><FONT face="Arial" size="3"><BR>

*Company Name:</FONT><BR>

<INPUT type="text" name="company" size="50">

<BR>

<BR>

Address:<BR>

<INPUT type="text" name="address" size="50">

<BR>

<BR>

City:<BR>

<INPUT type="text" name="city">

<BR>

<BR>

State/Prov:<BR>

<INPUT type="text" name="state">

<BR>

<BR>

Country:<BR>

<INPUT type="text" name="country">

<BR>

<BR>

Zip/Post. Code:<BR>

<INPUT type="text" name="zip">

<BR>

<BR>

*
Phone:<BR>

<INPUT type="text" name="phone">

<BR>

<BR>

Fax:<BR>

<INPUT type="text" name="fax">

<BR>

<BR>

*Email:<BR>

<INPUT type="text" name="email" size="50">

<BR>

<BR>

*
Contact:<BR>

<INPUT type="text" name="contact" size="50">

<BR>

<BR>

*Services Requested:<BR>

<TEXTAREA name="service" cols="50" rows="10"></TEXTAREA>

</P>

<P align="left"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<INPUT type="button" name="Submit" value="Submit Request" onClick="emailData() ;">

<INPUT type="reset" name="Submit2" value="Reset Form">

</P>

</FORM>

</TD>
Copy linkTweet thisAlerts:
@tims15authorMay 22.2005 — Thanks for that, but will it not use the users email client to send the message?
Copy linkTweet thisAlerts:
@netNITCHMay 22.2005 — Yes, you would need to use CGI if you don't want that. Startlogic is a good host for this, you can buld a form with their generator and it will create the form and CGI script for you.
Copy linkTweet thisAlerts:
@tims15authorMay 22.2005 — How would I do it without moving to startlogic?
Copy linkTweet thisAlerts:
@FangMay 22.2005 — Use the script given by [B]rhsunderground[/B]
Copy linkTweet thisAlerts:
@SanimMay 22.2005 — netNITCH, I wouldn't use JavaScript for an email form. Many people have JavaScript disabled on their web browser(s), so the form wouldn't work for some users. PHP, on the other hand, cannot be disabled.
Copy linkTweet thisAlerts:
@tims15authorMay 23.2005 — I've got it to work now, thanks everyone for your help!
Copy linkTweet thisAlerts:
@selbourneMay 23.2005 — well there are many form emailing services on the net and one could readily use them
×

Success!

Help @tims15 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.13,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...