Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
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

  • Administrator
  • 24,501 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

  • Administrator
  • 24,501 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="youremail@address.com">
<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

  • Administrator
  • 24,501 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