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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newbee Needs Form Help 3

Status
Not open for further replies.

rgarcia5

Vendor
Nov 14, 2001
6
US
I do not know the first thing about PHP, except that it looks greek. I have an html form and I need it to have PHP coding. Can someone help me. The form is located at

I would appreciate any help you can give.

Thanks!
 
Hi,

What exactly are you looking for here. I would assume you need some kind of validation and then an action to either save info or email it to you.

What exactly do you want/need though?

relax.gif


Keep up to date with my 2003 NHL Playoffs Wallpaper
 
The present form doesn't work. I was told I need to use PHP instead of CGI. I need the code and explicit 1,2,3 directions on how to use / apply it.
 
Make another page with .php, Direct the form to the page
I got my mail code from the web.

Read a bit first on and for the basics

Basically what you need is to capture the form data and then just mail it. It's very simple. You can capture the data by using the exact same name as in your form.
Example : Farm-Name

If you put echo $Farm-Name; in your php code it should display the input written in the field Farm-Name


<?php

echo $Farm-Name; // will display the user data.
?>

Read up also on mail() function in php documentation
 
Based on the html code in the form, I am assuming that you want the information entered by the client emailed to you, am I correct? We are not quite sure here, base on what you provided we can only assume your desired results.

You have not told us what you want to accomplish with the php side of this form. We can only help you if you provide us with more information. Example: do you want it to display a dragon and then shutdown your computer, or do you want the information entered by the client to be emailed to you, what do you need php to do?

please provide us more accurate information so that we can further help you accomplish your end result.

Max

 
Yes, I want a website visitor to fill out the form and it be emailed to a recipient. From what I understand, PHP can do this safely. I must change the form to PHP, but haven't understood how to do that yet.
 
Change your action on the form to point to: formmail.php when you click submit.

and past the code below in a new page and save it as formmail.php so when they fill out the form it will call this page and process your form values entered by the client and email it to you.


past this in a new page:

<?php mail(&quot;hiddencreek@pitnet.net&quot;, &quot;New Client Filled Out Your Mail Form&quot;, //email address and subject of email
&quot;Farm Name: $Farm-Name
Name: $Name
Address: $Address
City: $City
State: $State
Zip Code: $Zip
Telephone: $Telephone
Fax: $Fax
E-mail: $E-mail
Future Sale Consignments: $I-want-more-information-on 1
Information on the Hidden Creek Farm breeding program: $I-want-more-information-on 2
Semen and/or embryos available: $I-want-more-information-on 3
More information about Hidden Creek Farm: $I-want-more-information-on 4
Comments: $Comments &quot;);?>

code is ready to go and work with your form now.. but just know that in this form we do not give out code we like for people to reaserch so that they can learn and help others.

Nothing is hard when you realy want to learn it.

Max
 
Thank you, thank you! Now that I see what you have done, I think I understand. In fact, I made some slight changes. That is what I needed was something to go by.
 
One more question, when they submit the form, they get a blank white page. Can I just add a simple link that says return to home page?
 
ups sorry, forget the first ; ..


should be header(&quot;Location:
instead

if you want to put a link to a home page though, go ahead..
use echo &quot;<A HREF=\&quot;index.html\&quot;>go back </A>&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top