Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

CGI script for email form


  • Please log in to reply

#1
lizzeydripping

lizzeydripping

    Member

  • Member
  • PipPip
  • 26 posts
I am trying to set up a company website and I can't find a clear and simple CGI script to upload to my host to enable me to have a simple contact us email form on the site. I am very new to this type of programming and I basically want something that is free, and I just have to copy, paste, customise slightly and upload. I have already written my form using dreamweaver.

I am very confused. Please help!
  • 0

Advertisements


#2
admin

admin

    Founder Geek

  • Community Leader
  • 24,639 posts
The most widely known is a program called FormMail, however CGI access is a security risk, and FormMail has been exploited by spammers all too often.

A better choice would be a PHP mailer:
http://www.dtheatre....ts/formmail.php
http://phpmailer.sourceforge.net/

Create your forms using html, and the PHP script runs in the background, protects your email addresses, and prevents turning your site into a spam server.
  • 0

#3
lizzeydripping

lizzeydripping

    Member

  • Topic Starter
  • Member
  • PipPip
  • 26 posts
Oh dear! Thanks for the advice, but what is PHP, my host (123-reg) makes no reference to it...do I upload it to the host server?

I'm sorry, I really am flying blind here not to mention under huge time constraints! I was merrily coding away in Dreamweaver thinking all I had to do was make up a form and attach it....I've told my boss it's no problem and I have since discovered I lied!

Is there any further help you could offer?
  • 0

#4
admin

admin

    Founder Geek

  • Community Leader
  • 24,639 posts

Q. Do you support ASP, PHP, MYSQL, COLDFUSION, online catalogs such as MIVA MERCHANT?
123-reg doesn't, however, another Host Europe brand offers more advanced hosting packages to suit all your needs. Webfusion. If you need advanced functionality, call the sales team on 0115 917 0000


Looks like they don't support PHP :D I thought most every host supported PHP and MYSQL. <_<

Looks like you don't have much choice but to use FormMail:
http://www.scriptarc...m/formmail.html

Consider adding this to your .htaccess file for added security
redirect /cgi-sys/formmail.cgi http://www.stoptheviruscold.invalid
redirect /cgi-sys/formmail.pl http://www.stoptheviruscold.invalid
redirect /cgi-sys/FormMail.pl http://www.stoptheviruscold.invalid

  • 0

#5
ditto

ditto

    - i pwn n00bs -

  • Member
  • PipPipPipPip
  • 1,260 posts
you will have to download the formmail script from matt's script archive.

http://www.scriptarc...=formmail&c=zip

extract the file then upload the formmail.pl to your site.....for example yoursite.com/cgi/formmail.pl

then you will have to enter some code onto a new website....

the following code will submit a users name and email address . copy and paste the following code into notepad.

<!--- start form mail code --->
<table cellpadding="0" cellspacing="0" border="0"
bgcolor="ffffff" width="100%">
<form method="POST" action="yoursite.com/cgi/formmail.pl">
<input type=hidden name="recipient" value="[email protected]">
<input type=hidden name="redirect" value="website to go after submit email">
<input type=hidden name="print_config" value="realname,email,subject,type,submition">
<input type=hidden name="print_blank_fields" value="1">
<tr>
  <td width="20">&nbsp;</td>
  <td width="75" align="right"
valign="top">Name:</td>
  <td width="455" align="left">
  <input type=text name="realname" style="background:f9f9f9"
</td>
</tr>
<tr>
  <td width="20">&nbsp;</td>
  <td width="75" align="right"
valign="top">E-mail:&nbsp;</td>
  <td width="455" align="left">
  <input type=text name="email"></td>
</tr>
<tr>
  <td width="20">&nbsp;</td>
  <td width="75" align="right" valign="top"> </tr>
<tr>
  <td width="20">&nbsp;</td>
  <td width="50" align="right">&nbsp;</td>
  <td width="480" align="left" colspan="2">
<input type="submit" value="submit"></td>
</tr>
</form>
</table>
<!--- end form mail code --->


change the bold letters to adhere to your site or email address.
sorry if it looks mumbo jumbo but after you are finished, save the file as "contact.html" then upload it to your site.

i did this really quick so if you have any questions please reply back.

ditto
  • 0

#6
admin

admin

    Founder Geek

  • Community Leader
  • 24,639 posts
Nicely done ditto <_<
  • 0

#7
Cakeey

Cakeey

    New Member

  • Member
  • Pip
  • 1 posts
Hey, ditto, I knwo this is a very old post, but I just followed what you said, but it turned out " Can't find the cgi/formmail.pl on the server", how did I do with it?
I will really appreciate it.
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP