Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with formmail/creating a form

Status
Not open for further replies.

rdabvnblo

ISP
Feb 4, 2005
6
US
I am a begginer so bare with me.

Here is my situation.

I want to set up a form on my website. This form will ask for their name,phone number, e-mail address, will have several question feilds where they will use either a drop down menu or fill in a blank feild. On submittion I would like to receive an email with the info entered on the form.

I would also like to create unique forms to send the form info to the email of the page the form is setup for. I have a group of people working for me and they all have their own personal page. So I would like to place a form on their page and they will receive the email.

Here is my systen configuration.
Unix
I am using Freebsd.

DW MX2004 studio

Here is where I need help.

I need to know what I need to do to set up formmail

I am placing formmail in my cgi-bin

sendmail location: /usr/sbin/sendmail


Could anyone show me
a. the code I need to place in my cgi-bin

b. the code for a form

example.....

first name: required, letters and white space only
last name: required, letters and white space only
phone number: required, numbers only
email address: required, validate
qeustion No.1: Not required,this would be a drop down menu with choice of Yes/No
question No.2: Not required, they fill in this with a personal answer

submit button: will send answers to my email address

I hope I have provided enough info and I thank you all in advance for your help
 
You are doing your own hosting it appears - will you use Apache as your webserver? I would recommend (since you seem to be an open source fan) using php to write your email form with. You will have to buy a book or get online and look up the php code you will need.

I imagine DW will handle much of the form creation for you but the email part will probably have to be hand coded. Sorry, I don't use php so can't give you more than a pointer in the right direction.

Unless you have lots of free time or cash is really tight, it's just easier to hire a web developer.
 
Sounds like an interesting project and it should be simple enough to get it done.

Of course, like everything in the software development world, questions produce more questions than they do answers so, I have a couple of questions and some suggestions.

Q. Are you planning on using any server side scripting language? If so, which?

Q. What options does your 'sendmail' script give you?

Q. Can you modify your script to accept additional fields passed and have them resolved?

Q. How are you planning on accessing or capturing requested page?

Here is what I see you can attemp and problably give more likght to why I ask the above questions:

1. Set hidden fields in your form to store email receipients. Pass these fields to 'sendmail' script.

2. Modify links to include key that will help identify receipients thus knowing how to set your hidden fields.

3. Concider using SSL (Server Side Includes) to do this a bid more dynamically.

4. Modify 'sendmail' script to account for hidden fields.


As already suggested, I would look into PHP. I would also concider using MySQL and use databases to store both, content and setup information. PHP has means of doing things like this with minimal code and DW helps you do so as well.

Good luck!


Jose Lerebours




KNOWLEDGE: Something you can give away endlessly and gain more of it in the process! - Jose Lerebours
 
Thanks Josel for your response.

Heres the deal.

I have a dedicated Unix server. I am using FreeBSD 4.10 and webmin control panel.

I am using this to set up an information website. I want a form placed on the main page so that visitors can request more info.

I have formmail set up and operational now. Hoever I have only a basic form. I would like to limit how many time a single IP address can submit the form per day.

What I would like to accomplish is to have a form that a spam hacker won't be able to send multiple submittions and essentialy shut my box down.

I would like to be able to Get this info as follows:

First Name: required
Last Name: required
email address: required and must be in a valid email format
phone number: numbers only
extra text feild questions: they type in answer
extra drown menu questions: preselected ansewrs

I do have the ability to use hidden fields.
Would love it if you could create a sample form and also let me know if there is any thing that needs to be set on the server side script.

Is there anything elese I should be concerned about when putting a form online. I dont want to jeopardize my system.

Thanks for your input.
 
Jose,

I would also like to redirect them to a website after they submit the form.


Also could you point me in the right direction to get some insight on how to use PHP.

Thanks again.

Michael Stracher
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top