Register free!
Search
 
     

The Green Industry's Resource Center


Click for Weather
Reply
 
Thread Tools Display Modes
  #1  
Old 03-18-2007, 07:33 PM
StBalor StBalor is offline
LawnSite Senior Member
 
Join Date: Mar 2006
Location: Millersville, Maryland
Posts: 801
Question for Webman

1st off i would like to say thanks for pointing me in the right direction on my stats page in my cpanel.
I have been trying to create a form people can fill out and submit and it will go to my email. But it's not working. Whenever i press the submit button i get an error.
I know you could not figure out the problem just by what i said above. But if your willing to look at it, i could send you the page.
__________________
why i like cutting lawns so much:

It's the only job i know,
Where i can walk in circles and talk to myself
And no one thinks i'm crazy.
Reply With Quote
  #2  
Old 03-20-2007, 08:52 PM
freshfitz freshfitz is offline
LawnSite Member
 
Join Date: Oct 2003
Location: west chester pa
Posts: 5
Whats the error your getting?
Can you send me the url of the form?
Reply With Quote
  #3  
Old 03-20-2007, 11:06 PM
StBalor StBalor is offline
LawnSite Senior Member
 
Join Date: Mar 2006
Location: Millersville, Maryland
Posts: 801
Quote:
Originally Posted by freshfitz View Post
Whats the error your getting?
Can you send me the url of the form?
www.sunvalleylawnservice.com/Estimate.htm
__________________
why i like cutting lawns so much:

It's the only job i know,
Where i can walk in circles and talk to myself
And no one thinks i'm crazy.
Reply With Quote
  #4  
Old 03-21-2007, 07:09 AM
freshfitz freshfitz is offline
LawnSite Member
 
Join Date: Oct 2003
Location: west chester pa
Posts: 5
How did you program this cause you are posting the results to a .txt file which doesn't make any sense

<form method="POST" action="http://www.sunvalleylawnservice.com/Estimate.txt" name="myform">
__________________
Ryan S Fitzpatrick
Reply With Quote
  #5  
Old 03-21-2007, 09:25 AM
Dirty Water's Avatar
Dirty Water Dirty Water is offline
LawnSite Fanatic
 
Join Date: May 2005
Location: Redmond, WA
Posts: 6,802
Estimate.txt is actually in the cgi-bin directory which makes me think its a perl file.

Your going to have to post the code, for my to find your problem, you can use the code tags.

Code:
Use the code tags to preserve formatting.
Reply With Quote
  #6  
Old 03-21-2007, 09:38 AM
Raven386's Avatar
Raven386 Raven386 is offline
LawnSite Silver Member
 
Join Date: Apr 2006
Location: CT
Posts: 2,146
just a thought on your site.......i would take off how much you are insured for. just leave it that you have insurance.
Reply With Quote
  #7  
Old 03-21-2007, 01:30 PM
StBalor StBalor is offline
LawnSite Senior Member
 
Join Date: Mar 2006
Location: Millersville, Maryland
Posts: 801
Quote:
Originally Posted by freshfitz View Post
How did you program this cause you are posting the results to a .txt file which doesn't make any sense

<form method="POST" action="http://www.sunvalleylawnservice.com/Estimate.txt" name="myform">
Quote:
Originally Posted by Dirty Water View Post
Estimate.txt is actually in the cgi-bin directory which makes me think its a perl file.

Your going to have to post the code, for my to find your problem, you can use the code tags.

Code:
Use the code tags to preserve formatting.

I have tried lots of different ways to get this to work. Followed a few tutorials. they did not explain things very well so this is what i ended up with this time before i gave up.
I have no idea how to get this to work, i have had many error messages, this just happens to be the last.
__________________
why i like cutting lawns so much:

It's the only job i know,
Where i can walk in circles and talk to myself
And no one thinks i'm crazy.
Reply With Quote
  #8  
Old 03-21-2007, 01:44 PM
StBalor StBalor is offline
LawnSite Senior Member
 
Join Date: Mar 2006
Location: Millersville, Maryland
Posts: 801
Ok, here is the code. I changed it a bit since i last posted. Seems to be the closest i have been so far.

<form method="get" action="http://www.sunvalleylawnservice.com/Estimate.htm" name="myform">
<input type="hidden" name="success" value="estimate@sunvalleylawnservice.com">
<b><center>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Please Fill Out All Fields</center></B><br>
&nbsp;&nbsp;&nbsp;First and Last Name:<br>
&nbsp;&nbsp;&nbsp;<input type="text" name="name" size=25 maxlength=50><br><br>

&nbsp;&nbsp;&nbsp;Email Address:<br>
&nbsp;&nbsp;&nbsp;<input type="text" name="email" size=25 maxlength=50><br><br>

&nbsp;&nbsp;&nbsp;Street Address:<br>
&nbsp;&nbsp;&nbsp;<input type="text" name="address" size=25 maxlength=50><br><br>

&nbsp;&nbsp;&nbsp;City of Residence:<br>
&nbsp;&nbsp;&nbsp;<input type="text" name="city" size=25 maxlength=50><br><br>

&nbsp;&nbsp;&nbsp;Zip Code:<br>
&nbsp;&nbsp;&nbsp;<input type="text" name="zip" size=25 maxlength=50><br><br>

&nbsp;&nbsp;&nbsp;Phone:<br>
<input type="text" name="area" size=4 maxlength=3> -
<input type="text" name="exchange" size=4 maxlength=3> -
<input type="text" name="number" size=5 maxlength=4><br><br>

&nbsp;&nbsp;&nbsp;Plan Selection:<br>
<select name="Basic Lawn Service">
<option value="Basic Lawn Service">Basic Lawn Service</option>
<option value="SVLS Lawn Package">SVLS Lawn Package</option>
<option value="Custom Lawn Package">Custom Lawn Package</option>
<option value="Complete Lawn Package">Complete Lawn Package</option>
</select><br><br>

&nbsp; Other Services: Use as much detail as possible.<br>
<textarea name="Other Services:" rows="4"></textarea><br><br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<INPUT TYPE="submit" value="Submit">
</form>
__________________
why i like cutting lawns so much:

It's the only job i know,
Where i can walk in circles and talk to myself
And no one thinks i'm crazy.
Reply With Quote
  #9  
Old 03-21-2007, 01:51 PM
Dirty Water's Avatar
Dirty Water Dirty Water is offline
LawnSite Fanatic
 
Join Date: May 2005
Location: Redmond, WA
Posts: 6,802
Please paste whatever the file in the action property of the form tag is.

Tell me also if your server has PHP and SendMail installed.
Reply With Quote
  #10  
Old 03-21-2007, 02:04 PM
Dirty Water's Avatar
Dirty Water Dirty Water is offline
LawnSite Fanatic
 
Join Date: May 2005
Location: Redmond, WA
Posts: 6,802
Here is a PHP script I just wrote to help you out:

Code:
<?php

// Change this to your e-mail address:

$myEmail = 'email@email.com';

// Gather Form Data into variables
$name = $_POST['name'];
$email = $_POST['email'];
$address = $_POST['address'];
$city = $_POST['city'];
$zip = $_POST['zip'];

$phonearray = array($_POST['area'],$_POST['exchange'],$_POST['number']);

// Parse the phone number into one variable with hyphens.
$phonenumber = implode('-',$phonearray);

// Remove the spaces in the names in your HTML form to match these:

$service = $_POST['BasicLawnService'];
$other = $_POST['OtherServices'];

// E-mail variables

$subject = 'Automated Estimate Request from Website';

// Build the e-mail message:
$message = "Name: $name \n Email: $email \n Address: $address \n City: $city \n ZipCode: $zipcode \n \n Phone Number: $phonenumber \n \n Service Requested: $service \n \n Other Services: $other";

// Send mail
mail ($myEmail, $subject, $message);
?>
I didn't test run this, but it should work.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump





Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright ©1998 - 2012, LawnSite.comô - Moose River Media
All times are GMT -4. The time now is 09:59 PM.

Page generated in 0.12847 seconds with 7 queries