Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Help Assistance Please
Old 03-12-2009, 12:47 PM Help Assistance Please
Average Talker

Posts: 27
Name: Steve
Trades: 0
I have a simple form to email which I am having problems with.
It is not returning the data back via email. I know it's something simple, but I have looked at this script for so long now my mind is gone.

Anyone want to help me out here???
__________________
SR Design Concepts
Steve Rosenthal

Please login or register to view this content. Registration is FREE
srdesign is offline
Reply With Quote
View Public Profile Visit srdesign's homepage!
 
 
Register now for full access!
Old 03-12-2009, 01:00 PM Re: Help Assistance Please
KML9870's Avatar
One Bad Mamma :-)

Posts: 5,489
Name: Kandi
Location: Western NY
Trades: 0
You need to post the code and we would be happy to help you.
__________________
~~Kandi~~

Please login or register to view this content. Registration is FREE


KML9870 is offline
Reply With Quote
View Public Profile
 
Old 03-12-2009, 01:13 PM Re: Help Assistance Please
Average Talker

Posts: 27
Name: Steve
Trades: 0
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>ContactForm</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<form action="--WEBBOT-SELF--" method="post" enctype="multipart/form-data" name="contactform" id="contactform">
  <!--webbot bot="SaveResults" S-Email-Address="service@theultimatehandymen.com" S-Email-Format="TEXT/PRE" -->
  <table width="414" border="0" align="center">
    <tr>
      <td width="200">Name</td>
      <td width="200"><input name="name" type="text" id="name"></td>
    </tr>
    <tr>
      <td width="200">Street Address </td>
      <td width="200"><input name="street" type="text" id="street"></td>
    </tr>
    <tr>
      <td width="200">City</td>
      <td width="200"><input name="city" type="text" id="city"></td>
    </tr>
    <tr>
      <td width="200">Zipcode</td>
      <td width="200"><input name="zipcode" type="text" id="zipcode"></td>
    </tr>
    <tr>
      <td width="200">Phone Number </td>
      <td width="200"><input name="phone" type="text" id="phone"></td>
    </tr>
    <tr>
      <td width="200">E-mail</td>
      <td width="200"><input name="email" type="text" id="email"></td>
    </tr>
    <tr>
      <td width="200">Please Provide a Short Description of the Project </td>
      <td width="200"><textarea name="description" id="description"></textarea></td>
    </tr>
    <tr>
      <td width="200">How Soon You Need This Project Done </td>
      <td width="200"><select name="time" id="time">
        <option value="0">Emergency</option>
        <option value="1" selected>Immediately within 1-2 days</option>
        <option value="2">Within a week</option>
        <option value="3">Within a month</option>
      </select></td>
    </tr>
    <tr>
      <td width="200">Please Indicate Your Availability </td>
      <td width="200"><select name="availability" id="availability">
        <option value="0" selected>Monday</option>
        <option value="1">Tuesday</option>
        <option value="2">Wednesday</option>
        <option value="3">Thursday</option>
        <option value="4">Friday</option>
        <option value="5">Saturday</option>
        <option value="6">Sunday</option>
      </select></td>
    </tr>
    <tr>
      <td>Preference</td>
      <td><select name="preference" id="preference">
        <option value="0">Morning</option>
        <option value="1">Afternoon</option>
        <option value="2">Evening</option>
        <option value="3" selected>No Preference</option>
      </select></td>
    </tr>
    <tr>
      <td>How Did You Hear About Us </td>
      <td><textarea name="hear" id="hear"></textarea></td>
    </tr>
    <tr>
      <td><input type="submit" name="Submit" value="Send"></td>
      <td><input name="reset" type="reset" id="reset" value="Reset form"></td>
    </tr>
  </table>
</form>
</body>
</html>
__________________
SR Design Concepts
Steve Rosenthal

Please login or register to view this content. Registration is FREE

Last edited by KML9870; 03-12-2009 at 03:23 PM.. Reason: added code tags. When posting code, please wrap it in the code tages (# sign on WYSIWIG Editor).
srdesign is offline
Reply With Quote
View Public Profile Visit srdesign's homepage!
 
Old 03-12-2009, 01:18 PM Re: Help Assistance Please
stevej's Avatar
Professional Multitasker

Posts: 996
Location: Not positive
Trades: 0
Where did you ever get that script?? There's absolutely no way that could work on it's own. Is there an external file that you forgot to include?

- Steve
__________________
if($stevej == "helpful") { $talkupation += $user_power; }
stevej is offline
Reply With Quote
View Public Profile
 
Old 03-12-2009, 01:25 PM Re: Help Assistance Please
Average Talker

Posts: 27
Name: Steve
Trades: 0
The script was written by a friend of mine, who has asked me to "fix it". There is an additional .php file
__________________
SR Design Concepts
Steve Rosenthal

Please login or register to view this content. Registration is FREE
srdesign is offline
Reply With Quote
View Public Profile Visit srdesign's homepage!
 
Old 03-12-2009, 01:27 PM Re: Help Assistance Please
stevej's Avatar
Professional Multitasker

Posts: 996
Location: Not positive
Trades: 0
Quote:
Originally Posted by srdesign View Post
There is an additional .php file
We probably need to to see that as well.

- Steve
__________________
if($stevej == "helpful") { $talkupation += $user_power; }
stevej is offline
Reply With Quote
View Public Profile
 
Old 03-12-2009, 01:29 PM Re: Help Assistance Please
Average Talker

Posts: 27
Name: Steve
Trades: 0
Code:
<?php

/* Subject and Email Variables */

    $emailSubject = 'The Ultimate Handymen Website!';
    $webMaster = 'service@theultimatehandymen.com';
    
/* Gathering Data Variables */

    $nameField = $_POST['name'];    
    $streetField = $_POST['street'];
    $cityField = $_POST['city'];
    $zipcodeField = $_POST['zipcode'];
    $phoneField = $_POST['phone'];
    $emailField = $_POST['email'];
    $descriptionField = $_POST['description'];
    $timeField = $_POST['time'];
    $availabilityField = $_POST['availability'];
    $preferenceField = $_POST['preference'];
    $hearField = $_POST['hear'];
    
    $body = <<<EOD
<br><hr><br>
Name: $name <br>
Street: $street <br>
City: $city <br>
Zipcode: $zip <br>
Phone Number: $phone <br>
Email: $email <br>
Description: $description <br>
Time: $time <br>
Availability: $availability <br>
Preference: $preference <br>
Hear: $hear <br>
EOD;

    $headers = "From: $name\r\n";
    $headers .= "Content-type: text/html\r\n";
    $success = mail($webMaster, $emailSubject, $body, $headers);
    
/* Results rendered as HTML */

    $theResults = <<<EOD    
<html>
<head>
<title>The Ultimate Handymen-Homepage</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body {
    background-color: #f1f1f1;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 12px;
    font-style: normal;
    line-height: normal;
    font-weight: normal;
    color: #666666;
    text-decoration: none;
}
-->
</style>
</head>

<div>
  <div align="left">Thank you for your interest! Your email will be answered very soon!</div>
</div>
</body>
</html>
EOD;
echo "$theResults";

?>
__________________
SR Design Concepts
Steve Rosenthal

Please login or register to view this content. Registration is FREE

Last edited by KML9870; 03-12-2009 at 03:23 PM..
srdesign is offline
Reply With Quote
View Public Profile Visit srdesign's homepage!
 
Old 03-12-2009, 04:05 PM Re: Help Assistance Please
stevej's Avatar
Professional Multitasker

Posts: 996
Location: Not positive
Trades: 0
Okay... after working on your code for a little while, I've come up with a quick little solution:

Replace your php file with this:
PHP Code:
<?php

/* Subject and Email Variables */

    
$emailSubject 'The Ultimate Handymen Website!';
    
$webMaster 'service@theultimatehandymen.com';
    
/* Gathering Data Variables */

    
$name $_POST['name'];    
    
$street $_POST['street'];
    
$city $_POST['city'];
    
$zipcode $_POST['zipcode'];
    
$phone $_POST['phone'];
    
$email $_POST['email'];
    
$description $_POST['description'];
    
$time $_POST['time'];
    
$availability $_POST['availability'];
    
$preference $_POST['preference'];
    
$hear $_POST['hear'];
    
    
$body '
<br><hr><br>
Name: '
.$name.' <br>
Street: '
.$street.' <br>
City: '
.$city.' <br>
Zipcode: '
.$zip.' <br>
Phone Number: '
.$phone.' <br>
Email: '
.$email.' <br>
Description: '
.$description.' <br>
Time: '
.$time.' <br>
Availability: '
.$availability.' <br>
Preference: '
.$preference.' <br>
Hear: '
.$hear.' <br>';

    
$headers "From: ".$name."\r\n";
    
$headers .= "Content-type: text/html\r\n";
    
$success mail($webMaster$emailSubject$body$headers);
    
/* Results rendered as HTML */

    
$theResults '  
<html>
<head>
<title>The Ultimate Handymen-Homepage</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body {
    background-color: #f1f1f1;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 12px;
    font-style: normal;
    line-height: normal;
    font-weight: normal;
    color: #666666;
    text-decoration: none;
}
-->
</style>
</head>

<div>
  <div align="left">Thank you for your interest! Your email will be answered very soon!</div>
</div>
</body>
</html>'
;
echo 
$theResults;

?>
And your HTML page with this:
HTML Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>ContactForm</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<form action="sendmail.php" method="post" enctype="multipart/form-data" name="contactform" id="contactform">
<table width="414" border="0" align="center">
<tr>
<td width="200">Name</td>
<td width="200"><input name="name" type="text" id="name"></td>
</tr>
<tr>
<td width="200">Street Address </td>
<td width="200"><input name="street" type="text" id="street"></td>
</tr>
<tr>
<td width="200">City</td>
<td width="200"><input name="city" type="text" id="city"></td>
</tr>
<tr>
<td width="200">Zipcode</td>
<td width="200"><input name="zipcode" type="text" id="zipcode"></td>
</tr>
<tr>
<td width="200">Phone Number </td>
<td width="200"><input name="phone" type="text" id="phone"></td>
</tr>
<tr>
<td width="200">E-mail</td>
<td width="200"><input name="email" type="text" id="email"></td>
</tr>
<tr>
<td width="200">Please Provide a Short Description of the Project </td>
<td width="200"><textarea name="description" id="description"></textarea></td>
</tr>
<tr>
<td width="200">How Soon You Need This Project Done </td>
<td width="200"><select name="time" id="time">
<option value="0">Emergency</option>
<option value="1" selected>Immediately within 1-2 days</option>
<option value="2">Within a week</option>
<option value="3">Within a month</option>
</select></td>
</tr>
<tr>
<td width="200">Please Indicate Your Availability </td>
<td width="200"><select name="availability" id="availability">
<option value="0" selected>Monday</option>
<option value="1">Tuesday</option>
<option value="2">Wednesday</option>
<option value="3">Thursday</option>
<option value="4">Friday</option>
<option value="5">Saturday</option>
<option value="6">Sunday</option>
</select></td>
</tr>
<tr>
<td>Preference</td>
<td><select name="preference" id="preference">
<option value="0">Morning</option>
<option value="1">Afternoon</option>
<option value="2">Evening</option>
<option value="3" selected>No Preference</option>
</select></td>
</tr>
<tr>
<td>How Did You Hear About Us </td>
<td><textarea name="hear" id="hear"></textarea></td>
</tr>
<tr>
<td><input type="submit" name="Submit" value="Send"></td>
<td><input name="reset" type="reset" id="reset" value="Reset form"></td>
</tr>
</table>
</form>
</body>
</html>
And it's VERY IMPORTANT to replace the "sendmail.php" bit with the URL of your .php file.

- Steve
__________________
if($stevej == "helpful") { $talkupation += $user_power; }

Last edited by stevej; 03-12-2009 at 04:07 PM..
stevej is offline
Reply With Quote
View Public Profile
 
Old 03-12-2009, 04:51 PM Re: Help Assistance Please
Average Talker

Posts: 27
Name: Steve
Trades: 0
Steve -

Thank you so much for your assistance. I have pulled out what little hair I have trying to figure this out.
You mentioned that all I needed to do was replace the "sendmail.php" bit with the URL of your .php file

So in essence I will replace that with www.ultimatehandymen.com ??? or must I direct it to the file itself?
__________________
SR Design Concepts
Steve Rosenthal

Please login or register to view this content. Registration is FREE
srdesign is offline
Reply With Quote
View Public Profile Visit srdesign's homepage!
 
Old 03-12-2009, 05:06 PM Re: Help Assistance Please
stevej's Avatar
Professional Multitasker

Posts: 996
Location: Not positive
Trades: 0
You gave me some php code a little while ago... what was the name of the file? You should replace (in the html file) the name 'sendmail.php' with the name of the file, or the full URL. So yes, the file itself.

- Steve
__________________
if($stevej == "helpful") { $talkupation += $user_power; }

Last edited by stevej; 03-13-2009 at 01:40 PM..
stevej is offline
Reply With Quote
View Public Profile
 
Old 03-13-2009, 02:28 PM Re: Help Assistance Please
Average Talker

Posts: 27
Name: Steve
Trades: 0
I uploaded the files as per your instruction, and now receive the following error:
From http://www.theultimatehandymen.com/contactform.htm

Now what do I do???
The page cannot be displayed

The page you are looking for cannot be displayed because an invalid method (HTTP verb) was used to attempt access. Please try the following:
  • Contact the Web site administrator if you believe that this request should be allowed.
  • Make sure that the Web site address displayed in the address bar of your browser is spelled and formatted correctly.
HTTP Error 405 - The HTTP verb used to access this page is not allowed.
Internet Information Services (IIS)


Technical Information (for support personnel)
  • Go to Microsoft Product Support Services and perform a title search for the words HTTP and 405.
  • Open IIS Help, which is accessible in IIS Manager (inetmgr), and search for topics titled Setting Application Mappings, Securing Your Site with Web Site Permissions, and About Custom Error Messages.
__________________
SR Design Concepts
Steve Rosenthal

Please login or register to view this content. Registration is FREE
srdesign is offline
Reply With Quote
View Public Profile Visit srdesign's homepage!
 
Old 03-13-2009, 02:40 PM Re: Help Assistance Please
stevej's Avatar
Professional Multitasker

Posts: 996
Location: Not positive
Trades: 0
Oh, okay. This is a 405 error, which probably means that your ISP does not support the POST method. Go to your .htm file and replace method="post" with method="get", and then go to your PHP file and replace all occourences of $_POST with $_GET.

- Steve
__________________
if($stevej == "helpful") { $talkupation += $user_power; }
stevej is offline
Reply With Quote
View Public Profile
 
Old 03-13-2009, 04:52 PM Re: Help Assistance Please
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,382
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
you can't send a form with enctype="multipart/form-data" using a GET method it MUST be POSTed.

GET forms should be enctype="application/x-www-form-urlencoded"
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 03-13-2009, 04:59 PM Re: Help Assistance Please
stevej's Avatar
Professional Multitasker

Posts: 996
Location: Not positive
Trades: 0
Oh, I didn't notice the wrong enctype. Thanks, Chris.

- Steve
__________________
if($stevej == "helpful") { $talkupation += $user_power; }
stevej is offline
Reply With Quote
View Public Profile
 
Old 03-13-2009, 06:56 PM Re: Help Assistance Please
Average Talker

Posts: 27
Name: Steve
Trades: 0
Now I get this error: Which might be caused by what Chris was saying.

The page cannot be found

The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.
Please try the following:
  • Make sure that the Web site address displayed in the address bar of your browser is spelled and formatted correctly.
  • If you reached this page by clicking a link, contact the Web site administrator to alert them that the link is incorrectly formatted.
  • Click the Back button to try another link.
HTTP Error 404 - File or directory not found.
Internet Information Services (IIS)
__________________
SR Design Concepts
Steve Rosenthal

Please login or register to view this content. Registration is FREE
srdesign is offline
Reply With Quote
View Public Profile Visit srdesign's homepage!
 
Old 03-14-2009, 02:03 AM Re: Help Assistance Please
Average Talker

Posts: 27
Name: Steve
Trades: 0
So where do I go from here?
__________________
SR Design Concepts
Steve Rosenthal

Please login or register to view this content. Registration is FREE
srdesign is offline
Reply With Quote
View Public Profile Visit srdesign's homepage!
 
Old 03-14-2009, 06:11 AM Re: Help Assistance Please
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,382
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
make sure "contactformprocess.php" exists on the site 'cos obviously it doesn't.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 03-14-2009, 06:58 AM Re: Help Assistance Please
Banned

Posts: 7
Trades: 0
I think "contactformprocess.php" Does not exist in your project.
Is it there? if it is there then make sure that you have spelled it correctly and nothing is omitted like file extension or something like that.
rogi2112 is offline
Reply With Quote
View Public Profile
 
Old 03-14-2009, 01:14 PM Re: Help Assistance Please
Average Talker

Posts: 27
Name: Steve
Trades: 0
It's there, and nothing is spelled incorrectly. Could I have done something wrong?
__________________
SR Design Concepts
Steve Rosenthal

Please login or register to view this content. Registration is FREE
srdesign is offline
Reply With Quote
View Public Profile Visit srdesign's homepage!
 
Old 03-14-2009, 04:49 PM Re: Help Assistance Please
Average Talker

Posts: 17
Trades: 0
I recommend the free php form mail script from http://www.tectite.com (although it also uses POST). It has a lot of spam preventing and anti-hacking stuff built into it, it's free, and it's fairly easy to set up.
__________________
Check out the most detailed
Please login or register to view this content. Registration is FREE
, particularly the
Please login or register to view this content. Registration is FREE
and
Please login or register to view this content. Registration is FREE
.
Technique is offline
Reply With Quote
View Public Profile Visit Technique's homepage!
 
Reply     « Reply to Help Assistance Please

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 1.78129 seconds with 12 queries