Jump to content

Build Theme!
  •  
  • Infected?

WE'RE SURE THAT YOU'LL LOVE US!

Hey there! :wub: Looks like you're enjoying the discussion, but you're not signed up for an account. When you create an account, we remember exactly what you've read, so you always come right back where you left off. You also get notifications, here and via email, whenever new posts are made. You can like posts to share the love. :D Join 93081 other members! Anybody can ask, anybody can answer. Consistently helpful members may be invited to become staff. Here's how it works. Virus cleanup? Start here -> Malware Removal Forum.

Try What the Tech -- It's free!


Photo

Web Form: As failure to "Submit" send issue


  • Please log in to reply
25 replies to this topic

#1 Step_By_Step

Step_By_Step

    Authentic Member

  • Authentic Member
  • PipPip
  • 66 posts

Posted 19 October 2009 - 10:36 PM

I have an online web form as created (mostly) via "Microsoft Frontpage 2003". Visitor's at my online form need to be able to submit their completed online form to me via email from the internet. For whatever reason.......Completed forms are not currently being sent to my email address. Please assist me with step by step instructions in order to fix the problem. Best Regards.

Edited by Step_By_Step, 22 October 2009 - 10:59 PM.

    Advertisements

Register to Remove


#2 appleoddity

appleoddity

    SuperMember

  • Tech Team
  • 3,071 posts
  • Interests:Eating, Movies, Family, Church, Music, Volleyball, Softball, Poker, Computers, Electronics, Reading.

Posted 20 October 2009 - 08:17 PM

You are using a frontpage extension to perform the e-mail function. First of all, the web host has to have enabled frontpage extensions and support that paticular function. It appears that tripod.com does support and automatically enables those extensions, but here is further information: http://www.tripod.ly.../frontpage.html

Secondly, when using Frontpage extensions you can not use FTP to upload the website, you must Publish the webpage with Frontapge. Here's a little information on how to do that: http://freepages.gen...tpage-2003.html

Lastly, I don't use Frontpage, don't do much web design, and don't know anything about frontpage extensions. But, what I do see by looking at the pages source code is that your e-mail address is plastered on the website for every spam bot in the world to send spam to you. This looks like a very poor implementation of a form with e-mail capabilities.

You need to look at some simple PHP code to handle the form and e-mail function so it is handled properly, and done discreetly. You can even add captcha to prevent spam. By using the code for the form you already designed and making some modifications you could easily create a PHP script to perform the e-mail function.

Here is some information for you:
http://php.about.com...s/form_mail.htm
http://www.thesitewi...edbackphp.shtml
http://www.w3schools...HP/php_mail.asp

Please consider moving away from frontpage and especially the sloppiness I can see in the e-mail function, and implement a professional .PHP script.

Happy coding!

The help you have been given is free. If you have been happy with our help please consider donating to support this forum.

If you would like to say thanks for the help I have given you please View My Profile and Leave a Comment.
Your encouragement is welcome.


#3 Step_By_Step

Step_By_Step

    Authentic Member

  • Authentic Member
  • PipPip
  • 66 posts

Posted 21 October 2009 - 02:18 PM

Hi appleoddity:
Thank you for your time.
Sadly, I must be misunderstanding something. Please bear with me as I'm a disabled person (volunteer) and I'm struggling with this.
Please note that I altered the code and then I tested the online web form. Sadly the results were not good. Please see the following:
:( Error as follows:Posted Image
:( Still another error as follows: (I repeatedly edited the code only to experience various error messages after attempting to submit the form)
Posted Image
:( Another error as follows:
Posted Image
I'm also a bit confused by one of your prior statements:

your e-mail address is plastered on the website for every spam bot in the world to send spam to you. This looks like a very poor implementation of a form with e-mail capabilities.

You need to look at some simple PHP code to handle the form and e-mail function so it is handled properly, and done discreetly.

Exactly how does the PHP code that I've added stop spam bots from obtaining my email address?
What stops visitors to my web (form) page from simply clicking on: "View" and then "Page Source" and finding my email address that way?
PS. The websites that you referred me to are sadly too confusing for a newbie. If I could understand them then I wouldn't need them.

Edited by Step_By_Step, 21 October 2009 - 04:32 PM.


#4 appleoddity

appleoddity

    SuperMember

  • Tech Team
  • 3,071 posts
  • Interests:Eating, Movies, Family, Church, Music, Volleyball, Softball, Poker, Computers, Electronics, Reading.

Posted 21 October 2009 - 10:15 PM

Your code is no longer on-line and I am unable to look at what you attempted to do. PHP is an interpreted language. Unlike HTML where the code is sent directly to the clients web browser and then displayed, PHP is interpreted on the server side and then the "output" is sent to the client's browser. The difference is that PHP is run on the server and the user never gets to see the code, only the output that you generate. Therefore, your e-mail address can be hard coded in the PHP script and the end user never gets to see that. PHP is a real programming language that is executed on the server. The plain PHP code is never sent directly to the web browser. Use the "code" button in the forum and copy and paste your HTML and PHP code that you have tried to upload to your web host. I'll take a look at what you came up with and try to lead you in the right direction.

The help you have been given is free. If you have been happy with our help please consider donating to support this forum.

If you would like to say thanks for the help I have given you please View My Profile and Leave a Comment.
Your encouragement is welcome.


#5 Step_By_Step

Step_By_Step

    Authentic Member

  • Authentic Member
  • PipPip
  • 66 posts

Posted 21 October 2009 - 11:41 PM

Hi appleoddity:
I tried a variety of editing on the code as adding my forms URL address (and or a Thank you page (URL) for visitors to see after they successfully submit their online form: "http://homecare7.tri...Thank_You.html") into the code and changing a variety of things. However, (Because the aforementioned codes failed) I didn't save everything. Following is the code that I'm currently using.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta name="job" content="Home_care_job_application_form">
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Job_Applicants_Initial_Contact_Form</title>
</head>
<body>
<form method="post" action="sendeail.php">


<?php
  $email = $_REQUEST['emailofsender'];
  $message = $_REQUEST['contentsofmessage'];

  mail ( "noemail@nowhere.com", "Feedback Form Results",
	$message, "From: $email" );
  header( "Location:" );
?>


	<p><strong>Job Applicant's Initial Contact</strong></p>
<hr>
<p>This form should only be completed by persons who are seeking a job in the<br>
home care field as a Personal Assistant in the Sheepshead Bay area of Brooklyn, 
NY.<br>
<br>
Please provide the following information:</p>
<p>First Name:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;		<input type="text" name="T2" size="20"></p>
<p>Last Name:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;		<input type="text" name="T3" size="20"></p>
<p>Middle Initial:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;	 <input type="text" name="T4" size="20"></p>
<p>Date of Birth:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;	  <input type="text" name="T5" size="20"> <em>
-- mm/dd/yyyy</em></p>
<p>Home Address:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;   <input type="text" name="T6" size="20"></p>
<p>Address (cont.):&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  <input type="text" name="T7" size="20"></p>
<p>City:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;					<input type="text" name="T8" size="20"></p>
<p>State/Province:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;	<input type="text" name="T9" size="20"></p>
<p>Zip/Postal Code:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input type="text" name="T10" size="20"></p>
<p>Country:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;			  <input type="text" name="T11" size="20"></p>
<p>Home Phone:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;	   <input type="text" name="T12" size="20"></p>
<p>Cellular Phone:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;	 <input type="text" name="T13" size="20"></p>
<p>Work Phone:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;	   <input type="text" name="T14" size="20"></p>
<p>Fax:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;					 <input type="text" name="T15" size="20"></p>
<p>E-mail:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;				 <input type="text" name="T16" size="20"></p>
<p>How long have you lived at the above mentioned home address?&nbsp;&nbsp; <input type="text" name="T17" size="20"></p>
<p>I'm a citizen of: <br>
(Please select one of the following options)<br>
<input type="radio" value="V1" checked name="R1"> United States of America</p>
<p><input type="radio" name="R1" value="V2"> Canada</p>
<p><input type="radio" name="R1" value="V3"> Haiti</p>
<p><input type="radio" name="R1" value="V4"> Jamaica</p>
<p><input type="radio" name="R1" value="V5"> Japan</p>
<p><input type="radio" name="R1" value="V6"> Korea</p>
<p><input type="radio" name="R1" value="V7"> Peru</p>
<p><input type="radio" name="R1" value="V8"> Russia</p>
<p><input type="radio" name="R1" value="V9"> If Other: Please Specify:</p>
<p>Country:			 <input type="text" name="T18" size="20"></p>
<p>Do you have a Social Security Card?&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
Yes <input type="radio" name="Social Security Card?" value="Yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; No <input type="radio" name="Social Security Card?" value="No"></p>
<p>Do you have a Green Card?&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
Yes <input type="radio" name="Green Card?" value="Yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; No <input type="radio" name="Green Card?" value="No"></p>
<p>Are you lawfully employable in the United States of America?&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
Yes <input type="radio" name="lawfully employable" value="Yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; No <input type="radio" name="lawfully employable" value="No"></p>
<p>Do you possess a valid New York State Drivers License?&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
Yes <input type="radio" name="New York State Drivers License?" value="Yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
No <input type="radio" name="New York State Drivers License?" value="No"></p>
<p>What is the longest that you've held any single job?					  <input type="text" name="T19" size="20"></p>
<p>What day's are you available to work?</p>
<p>Monday's:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
Yes <input type="radio" name="Monday's:" value="Yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
No <input type="radio" name="Monday's:" value="No">			   </p>
<p>Tuesday's:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
Yes <input type="radio" name="Tuesday's:" value="Yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
No <input type="radio" name="Tuesday's:" value="No"></p>
<p>Wednesday's:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Yes <input type="radio" name="Wednesday's:" value="Yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
No <input type="radio" name="Wednesday's:" value="No"></p>
<p>Thursday's:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
Yes <input type="radio" name="Thursday's:" value="Yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
No <input type="radio" name="Thursday's:" value="No"></p>
<p>Friday's:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Yes <input type="radio" name="Friday's:" value="Yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; No <input type="radio" name="Friday's:" value="No"></p>
<p>Saturday's:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Yes <input type="radio" name="Saturday's:" value="Yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
No <input type="radio" name="Saturday's:" value="No"></p>
<p>Sunday's:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; 
Yes <input type="radio" name="Sunday's:" value="Yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
No <input type="radio" name="Sunday's:" value="No"></p>
<p>Are you available full time?&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Yes <input type="radio" name="full time?" value="Yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; No <input type="radio" name="full time?" value="No"></p>
<p>Are you available part time?&nbsp;&nbsp;&nbsp;&nbsp; Yes <input type="radio" name="part time?" value="Yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; No <input type="radio" name="part time?" value="No"></p>
<p>
<tr><td colspan=2 align=center><input type="submit" value="Send Mail" name="submit">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;			<input type="reset" value="Reset" name="reset"></p>
<p>Copyright <font face="Times New Roman">©</font> 2009 [NYHC]. All rights reserved.<br>
Revised: October 17, 2009</p>
	<div style="border-style: solid; border-width: 1px; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px">
		&nbsp; <><font face="Arial">&nbsp;&nbsp;&nbsp; Please be advised: Certain computers may experience difficulties in submitting this (completed) form.
</font> 
 		<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	<font face="Arial">Therefore, if you experience any difficulties in submitting the above form online:
	</font> 
 </br>
	<br><font face="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Please feel free to print out the above (completed) form and fax it (and or your resume) to the following fax #:
	</font> 
 </br>
	<br><font face="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Fax#: 1-718-555-1212<p>
	<form>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input type="button" value=" Print this page "
onclick="window.print();return false;" /></form> </font>
</body>
</html>

Just a note:

PS. Many of the websites that offer up examples of the code Sadly fail to highlight the Exact parts that the newbie needs to change. In addition to highlighting the exact pieces of code that need to be changed by the newbie.......They should also add a reference number as corresponding to a note (Example: "#2email" Place your email address above in the area where you see the following "#2email". This should be the email address where you want completed form information to go.) in a quote box as immediately following that paragraph of code.Please note: Prior to adding your email address to the above location(s)....Please remember to first delete the highlighted "#2email" marker. However, please do not delete the "" quote marks as they are required to be present on both sides of your email address.


Edited by Step_By_Step, 22 October 2009 - 10:57 PM.
Removed user's e-mail address


#6 inzanity

inzanity

    ♠♠lost♠♠

  • Malware Team
  • 2,340 posts

Posted 22 October 2009 - 02:17 AM

Hi,

Am not really into PHP but in your HTML tag,

<form method="post" action="sendeail.php">


Do you have a form that has that name? Or should it be sendmail.php?

Proud graduate of WTT Classroom


The help we provide here is free, however, if you wish to donate, you can do so here: http://www.whatthetech.com/donate/

ASAP and UNITE member

________________________________________________


!


#7 Step_By_Step

Step_By_Step

    Authentic Member

  • Authentic Member
  • PipPip
  • 66 posts

Posted 22 October 2009 - 09:37 AM

To inzanity:
To answer your question "Yes". However, the following line of PHP is intentional:

<form method="post" action="sendeail.php">

Please note: I've also tried the other way to no avail.

#8 appleoddity

appleoddity

    SuperMember

  • Tech Team
  • 3,071 posts
  • Interests:Eating, Movies, Family, Church, Music, Volleyball, Softball, Poker, Computers, Electronics, Reading.

Posted 22 October 2009 - 10:19 AM

Yeah I see several issues here. Its not your fault really, but I do see that you aren't grasping the concept of how this works. :)

So, I have modified the code for you and have a working application.

Here's the application form html code.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta name="job" content="Home_care_job_application_form">
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Job_Applicants_Initial_Contact_Form</title>
</head>
<body>
<form method="post" action="sendmail.php">

	<p><strong>Job Applicant's Initial Contact</strong></p>
<hr>
<p>This form should only be completed by persons who are seeking a job in the<br>
home care field as a Personal Assistant in the Sheepshead Bay area of Brooklyn, 
NY.<br>
<br>
Please provide the following information:</p>
<p>First Name:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;		<input type="text" name="T2" size="20"></p>
<p>Last Name:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;		<input type="text" name="T3" size="20"></p>
<p>Middle Initial:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;	 <input type="text" name="T4" size="20"></p>
<p>Date of Birth:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;	  <input type="text" name="T5" size="20"> <em>
-- mm/dd/yyyy</em></p>
<p>Home Address:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;   <input type="text" name="T6" size="20"></p>
<p>Address (cont.):&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  <input type="text" name="T7" size="20"></p>
<p>City:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;					<input type="text" name="T8" size="20"></p>
<p>State/Province:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;	<input type="text" name="T9" size="20"></p>
<p>Zip/Postal Code:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input type="text" name="T10" size="20"></p>
<p>Country:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;			  <input type="text" name="T11" size="20"></p>
<p>Home Phone:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;	   <input type="text" name="T12" size="20"></p>
<p>Cellular Phone:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;	 <input type="text" name="T13" size="20"></p>
<p>Work Phone:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;	   <input type="text" name="T14" size="20"></p>
<p>Fax:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;					 <input type="text" name="T15" size="20"></p>
<p>E-mail:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;				 <input type="text" name="T16" size="20"></p>
<p>How long have you lived at the above mentioned home address?&nbsp;&nbsp; <input type="text" name="T17" size="20"></p>
<p>I'm a citizen of: <br>
(Please select one of the following options)<br>
<input type="radio" value="USA" checked name="R1"> United States of America</p>
<p><input type="radio" name="Canada" value="V2"> Canada</p>
<p><input type="radio" name="Haiti" value="V3"> Haiti</p>
<p><input type="radio" name="Jamaica" value="V4"> Jamaica</p>
<p><input type="radio" name="Japan" value="V5"> Japan</p>
<p><input type="radio" name="Korea" value="V6"> Korea</p>
<p><input type="radio" name="Peru" value="V7"> Peru</p>
<p><input type="radio" name="Russia" value="V8"> Russia</p>
<p><input type="radio" name="Other" value="V9"> If Other: Please Specify:</p>
<p>Country:			 <input type="text" name="T18" size="20"></p>
<p>Do you have a Social Security Card?&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
Yes <input type="radio" name="SocCard" value="Yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; No <input type="radio" name="SocCard" value="No"></p>
<p>Do you have a Green Card?&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
Yes <input type="radio" name="GreenCard" value="Yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; No <input type="radio" name="GreenCard" value="No"></p>
<p>Are you lawfully employable in the United States of America?&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
Yes <input type="radio" name="UsaEmployable" value="Yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; No <input type="radio" name="UsaEmployable" value="No"></p>
<p>Do you possess a valid New York State Drivers License?&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
Yes <input type="radio" name="NYLicense" value="Yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
No <input type="radio" name="NYLicense" value="No"></p>
<p>What is the longest that you've held any single job?					  <input type="text" name="T19" size="20"></p>
<p>What day's are you available to work?</p>
<p>Monday's:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
Yes <input type="radio" name="Monday" value="Yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
No <input type="radio" name="Monday" value="No">			   </p>
<p>Tuesday's:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
Yes <input type="radio" name="Tuesday" value="Yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
No <input type="radio" name="Tuesday" value="No"></p>
<p>Wednesday's:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Yes <input type="radio" name="Wednesday" value="Yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
No <input type="radio" name="Wednesday" value="No"></p>
<p>Thursday's:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
Yes <input type="radio" name="Thursday" value="Yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
No <input type="radio" name="Thursday" value="No"></p>
<p>Friday's:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Yes <input type="radio" name="Friday" value="Yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; No <input type="radio" name="Friday" value="No"></p>
<p>Saturday's:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Yes <input type="radio" name="Saturday" value="Yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
No <input type="radio" name="Saturday" value="No"></p>
<p>Sunday's:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; 
Yes <input type="radio" name="Sunday" value="Yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
No <input type="radio" name="Sunday" value="No"></p>
<p>Are you available full time?&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Yes <input type="radio" name="fulltime" value="Yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; No <input type="radio" name="fulltime" value="No"></p>
<p>Are you available part time?&nbsp;&nbsp;&nbsp;&nbsp; Yes <input type="radio" name="parttime" value="Yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; No <input type="radio" name="parttime" value="No"></p>
<p>
<tr><td colspan=2 align=center><input type="submit" value="Submit" name="Submit">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;			<input type="reset" value="Reset" name="reset"></p>
<p>Copyright <font face="Times New Roman">©</font> 2009 [NYHC]. All rights reserved.<br>
Revised: October 17, 2009</p>
	<div style="border-style: solid; border-width: 1px; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px">
		&nbsp; <img src="http://i112.photobucket.com/albums/n196/tryout_06/info2.gif"><font face="Arial">&nbsp;&nbsp;&nbsp; Please be advised: Certain computers may experience difficulties in submitting this (completed) form.
</font> 
		<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	<font face="Arial">Therefore, if you experience any difficulties in submitting the above form online:
	</font> 
</br>
	<br><font face="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Please feel free to print out the above (completed) form and fax it (and or your resume) to the following fax #:
	</font> 
</br>
	<br><font face="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Fax#: 1-718-332-1965<p>
	<form>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input type="button" value=" Print this page "
onclick="window.print();return false;" /></form> </font>
</body>
</html>

Here's is the code for the PHP file. Save this file as sendmail.php and upload it to your web server. However, you need to change some of the information in the file such as e-mail address, confirmation e-mail body, etc..
The only e-mail address that will be kept private is at the top of the code. That is the e-mail address your application will be sent to. E-mail addresses that you add in other locations will be revealed to the applicant in one way or another.

<?php 

$to = "nyhc@nowhere.com"; // Place your e-mail address here  -- This will remain hidden

$subject = "Home Care Application";   // Subject of e-mail you will receive
$from = $_REQUEST['T16'];  // Applicant's e-mail address from form.
$headers = "From: $from"; // 'From address' of e-mail you receive (from form)

/* Load values from form into array.
The value on the left in brackets is the name of the value from the form.
The value on the right in quotes is what will be used to identify the data in the e-mail.
i.e.  Your e-mail will say -  First Name:  <data from form>, etc... */

$fields = array(); 
$fields{"T2"} = "First Name"; 
$fields{"T3"} = "Last Name"; 
$fields{"T4"} = "Middle"; 
$fields{"T5"} = "Date of birth"; 
$fields{"T6"} = "Address1"; 
$fields{"T7"} = "Address2"; 
$fields{"T8"} = "City"; 
$fields{"T9"} = "State"; 
$fields{"T10"} = "Zip"; 
$fields{"T11"} = "Country"; 
$fields{"T12"} = "Home #"; 
$fields{"T13"} = "Cell #"; 
$fields{"T14"} = "Work #"; 
$fields{"T15"} = "Fax #"; 
$fields{"T16"} = "E-Mail"; 
$fields{"T17"} = "Time at Current Address"; 
$fields{"R1"} = "Citizen of";
$fields{"T18"} = "Other Country"; 
$fields{"SocCard"} = "Has SS Card"; 
$fields{"GreenCard"} = "Has green card"; 
$fields{"UsaEmployable"} = "USA Employable"; 
$fields{"NYLicense"} = "NY Drivers License"; 
$fields{"T19"} = "Max. time ever employed"; 
$fields{"Monday"} = "Work Mondays"; 
$fields{"Tuesday"} = "Work Tuesdays"; 
$fields{"Wednesday"} = "Work Wednesdays"; 
$fields{"Thursday"} = "Work Thursdays"; 
$fields{"Friday"} = "Work Fridays"; 
$fields{"Saturday"} = "Work Saturdays"; 
$fields{"Sunday"} = "Work Sundays"; 
$fields{"fulltime"} = "Will Work Full-Time"; 
$fields{"parttime"} = "Will Work Part-Time"; 

// Build the body of the message from the form data
$body = "We have received the following information:\n\n"; foreach($fields as $a => $b){ $body .= sprintf("%20s: %s\n",$b,$_REQUEST[$a]); } 

// Compose a confirmation e-mail (this will be sent back to the applicant)
$headers2 = "From: noreply@YourCompany.com"; // Change this to a no reply address at your company - the user will see this as the from address for the confirmation e-mail
$subject2 = "Home Care Application - Confirmation"; 
// Compose your message to the applicant here.
$autoreply = "Thank you for contacting us. Your application has been received.  Somebody will get back to you as soon as possible, usualy within 48 hours. If you have any more questions, please consult our website at www.oursite.com";

if($from == '') {print "You have not entered an email, please go back and try again";} 
else { 
$send = mail($to, $subject, $body, $headers); 
$send2 = mail($from, $subject2, $autoreply, $headers2); 
if($send) 
{header( "Location: /Thank_You.html" );} 
else 
{print "We encountered an error sending your mail, please notify webmaster@YourCompany.com"; }   // Change to webmaster e-mail address
}

?>

There is a second file: Thank_You.html that will be displayed after the application is submitted. But, you already have that on-line it looks like.

So, if you really want to learn, you now have working code and if you are diligent can modify it as necessary to work.

Basically, you have an HTML web form. That form has several fields that are labeled by the "name=" property. When you click submit, all those values are sent to the sendmail.php program that processes the values and sends the e-mails. Within the sendmail.php module is a listing of all the "name=" properties that are in the HTML file so that it knows what they are named and can retrieve what the applicant typed in. Once it has that information it e-mails it off to you, and sends a confirmation back to the applicant. The applicant is then redirected to your thank you page.

Edited by appleoddity, 22 October 2009 - 10:21 AM.

The help you have been given is free. If you have been happy with our help please consider donating to support this forum.

If you would like to say thanks for the help I have given you please View My Profile and Leave a Comment.
Your encouragement is welcome.


#9 Step_By_Step

Step_By_Step

    Authentic Member

  • Authentic Member
  • PipPip
  • 66 posts

Posted 22 October 2009 - 04:13 PM

To: appleoddity:

Here's is the code for the PHP file. Save this file as sendmail.php and upload it to your web server. However, you need to change some of the information in the file such as e-mail address, confirmation e-mail body, etc..
The only e-mail address that will be kept private is at the top of the code. That is the e-mail address your application will be sent to. E-mail addresses that you add in other locations will be revealed to the applicant in one way or another.

1.) I'm a bit confused by your reply as it appears to contradict what you'd previously instructed me to do:
a.) In a prior posting you instructed me to utilize PHP in order to protect my email address. However, in the PHP code that you just sent to me it apparently instructs me to expose my email address in all except one location.
b.) If I understand correctly..........The PHP code that you just sent to me is apparently designed to send a detailed confirmation (email letter) to every person who submits a form. Why? I don't need or want that. Perhaps there was a miss communication as I never requested that.
c.) The PHP code that you sent to me is apparently generic and does not meet my needs. It also failed to function online after I uploaded it to my web page (during a test).
I'm puzzled as to why you didn't copy and paste the HTML code that I sent you (per your earlier request) earlier into your reply and make any and all needed corrections or editing so that it would fully function. Instead you wrote:

but I do see that you aren't grasping the concept of how this works.

So, I have modified the code for you and have a working application.

I don't understand........Exactly how did you modify the code for me as it's not even my code in PHP? (I tested it out online and it doesn't function.)
Note: I maybe (If there are clear instructions as to exactly what to place where.) able to edit the code. However, I require clear; simple; easy to follow instructions.Merely stating general stuff like the following is too vague and impossible (except for adding my email address) for a beginner to follow.

However, you need to change some of the information in the file such as e-mail address, confirmation e-mail body, etc..

You also wrote a very confusing statement as follows:

So, if you really want to learn, you now have working code and if you are diligent can modify it as necessary to work.

What does this mean? I obviously want to learn or I wouldn't be asking questions. However, if your unable (or don't have the time) to explain it in an easy to understand fashion..........then Please help me by simply editing my code to function in PHP as without any confirmation letters being sent to persons completing my form as well as protecting my privacy as not revealing my email address anywhere.
Please understand that this is not an academic exercise. Instead there are real people that desperately need jobs to survive. Part of my efforts involve.........Trying to help these people get a job. However, as long as this form fails to function............They are (in most cases) simply unable to apply. Many are using computers at a public library. Many are in poverty and cannot afford to buy and maintain a fax machine or pay for fax service (as food stamps are obviously not cash) as they simply can't afford it.
PS. Please understand I'm part of a very small program (No Money for internet anything.)

PPS. In a prior posting you wrote:

Please consider moving away from frontpage and especially the sloppiness I can see in the e-mail function, and implement a professional .PHP script.

I'm uncertain as to exactly where you got the idea that I had the money to buy a Professional .PHP script. I'm a disabled person (In pain!.) typing with one finger. Therefore, if I had the money to simply buy a professional .PHP script..........Why would I be spending time here asking questions? This is very confusing.

Edited by Step_By_Step, 22 October 2009 - 04:36 PM.


#10 appleoddity

appleoddity

    SuperMember

  • Tech Team
  • 3,071 posts
  • Interests:Eating, Movies, Family, Church, Music, Volleyball, Softball, Poker, Computers, Electronics, Reading.

Posted 22 October 2009 - 05:10 PM

Ok.. First, lets get one thing straight. I spent at least two hours this morning creating the code that I posted to you using only the links that I previously provided you for instruction. I then tested it and made sure that it functioned properly. I am not a web designer and I am not a PHP programmer. I have an extensive programming background but this is probably only the third little project I have ever done in PHP. However, as I stated, what I provided WORKS and the knowledge I used to create it was entirely gleaned from one single website which I listed in my previous post. In fact this IS an educational exercise, because as you stated, you cannot afford to pay anybody to do this for you. Therefore, you make the effort to learn how to do it yourself, and do not expect someone else to do it for you. No offense, you may be disabled, but that does not entitle you to a free ticket and to avoid hard work needed for your own endeavors. I'm not being paid to help you, and I am not wiling to help you unless you are willing to actually learn what you are doing. Otherwise you have done nothing but taken advantage of my kindness and helped one more person to be out of a job which you seem to be so concerned about. You're simply not grasping what we are doing here. This thread, and this forum, is not titled learn everything you need to know about HTML, PHP, scripting, e-mail and FTP. It is clear to me that if you really were interested in learning and spent a few hours reading that you would not have written several of the things that you did in your last post. I have given you code that functions, it does exactly what you need it to do and more. And, it works perfectly when implemented properly. There are comments in the code telling you exactly what to change. I did not produce the code for you to copy and paste with absolutely no effort and have a working application form. It was a general, WORKING script that meets your needs but needs to be modified to your liking. It is only one more example of the thousands that are available to you on-line to learn from. To do so you need to use the resources on the internet that are at your disposal. I'm not here to dedicate my life to creating an application form for you. Maybe I should've realized what you were expecting when you asked for "step-by-step instructions," in your original e-mail. By my comments I mean that I have lead you in the right direction, given you examples and websites to learn from, and have even created a working script for you. Now it is up to you to make the effort to learn how to do what it is you are trying to do. By doing so you will gain more knowledge and skills that you can use on other projects in the future. Hows the saying go, "give a man a fish and he'll eat for a day, teach him how to fish and he'll eat for a lifetime." Simply put, if you don't understand what you are doing than you have no business trying to do it, unless you are willing to learn why and how you do what you do.

The help you have been given is free. If you have been happy with our help please consider donating to support this forum.

If you would like to say thanks for the help I have given you please View My Profile and Leave a Comment.
Your encouragement is welcome.

    Advertisements

Register to Remove


#11 Step_By_Step

Step_By_Step

    Authentic Member

  • Authentic Member
  • PipPip
  • 66 posts

Posted 22 October 2009 - 10:54 PM

To: appleoddity:
Ok.. First, lets get one thing straight. I spent months (off and on) writing the HTML code along with various improvements and editing. . I am not a web designer and I am not a PHP programmer.
You wrote:

I have an extensive programming background but this is probably only the third little project I have ever done in PHP.

If this is the case: Simply put, you have no business trying to advice others on PHP code projects that are not easy.
You wrote:

However, as I stated, what I provided WORKS

If this is correct: Why did it fail to function after I edited it (as adding my email address)?
You wrote:

In fact this IS an educational exercise, because as you stated, you cannot afford to pay anybody to do this for you

I have made a great effort to learn - Sadly, You have failed to instruct me in a manner that was helpful. You referring me to (apparently) random websites is obviously not helpful as anyone can obtain a list of those via a search engine.
You wrote:

Therefore, you make the effort to learn how to do it yourself, and do not expect someone else to do it for you.

I visited this forum AFTER I made great efforts to learn and solve this programming issue on my own via those so called educational websites. If those (so called educational) websites were even half as good as you apparently think they are - Then nobody would be asking for help on this and other forums. These forums would not even be in existence.
You wrote:

No offense, you may be disabled, but that does not entitle you to a free ticket and to avoid hard work needed for your own endeavors.

I never asked you or anyone else for a free ticket. I was simply being open and honest with you as sharing my personal information. You replied with Hate Filled Negative Comments that essentially imply that if a person is disabled and poor that they are Lazy and seeking a free ticket and to avoid hard work needed to complete their own endeavors. If you recall (and or re-read) all of my postings to you: I primarily asked for your assistance in learning (Step by Step) how to (Only as a last ditch effort did I ask you for a different approach.) fix my web form. Sadly, you failed to successfully help me. Instead of you simply admitting your failure.....You sadly went on the Attack!
You wrote:

I'm not being paid to help you, and I am not wiling to help you unless you are willing to actually learn what you are doing.

On this note we partially agree as far as your following statement goes: "I'm not being paid to help you" This is true - Your not being paid to help me as this is obviously a volunteer forum.
Please note: I have a long history of volunteering to help other. At no time did I ever tell others seeking my help that: "they are Lazy and seeking a free ticket and that they are trying to avoid hard work needed to complete their own endeavors.
Please be advised: You shouldn't volunteer here or anywhere...........Unless or until you mean to do so with an open and giving heart (as without any thoughts about personal gain or lack thereof.)
In conclusion I feel deeply sorry for you. I sincerely hope that you get the help that you so obviously need.

#12 appleoddity

appleoddity

    SuperMember

  • Tech Team
  • 3,071 posts
  • Interests:Eating, Movies, Family, Church, Music, Volleyball, Softball, Poker, Computers, Electronics, Reading.

Posted 23 October 2009 - 07:41 AM

Failure? Home Care Application Form

I don't do anything unless I do it right. The above example works, and I literally used EXACTLY the code I posted earlier, but I added your e-mail address to it to receive the contact form.

I have not failed at anything, and my message to you is not "hate filled."

Apparently, you think I am spouting off at the mouth, sending you random links, and giving you generic code that doesn't meet your needs and doesn't work. You've done nothing short of waste my time because you aren't willing to spend a little bit of time to take the working example I gave you and get it implemented. Instead you complain, you want easier, you want step by step, you want more detail. THere is nothing else I can do but ask for your name and password and upload the form my self. It literally doesn't get any easier. I think the problem here is that I know you can accomplish this project, and I am holding you to a higher standard than you hold your self.

Quite frankly, if you have spent months on simply creating a web form, using a web design tool that does it all for you, and you still cannot figure this out, you probably need to seek someone more knowledgeable in your town who can give you one on one help and complete this project with you. Not all people can do all things and my knowledge comes from a pool of over 20 years of computer experience. Its not something I can teach you over night and that is why you need the desire and initiative to learn with a little guidance. You have failed to demonstrate that.

I will leave the form on-line for a few days at which point I will delete it.

Edited by appleoddity, 23 October 2009 - 07:42 AM.

The help you have been given is free. If you have been happy with our help please consider donating to support this forum.

If you would like to say thanks for the help I have given you please View My Profile and Leave a Comment.
Your encouragement is welcome.


#13 Step_By_Step

Step_By_Step

    Authentic Member

  • Authentic Member
  • PipPip
  • 66 posts

Posted 23 October 2009 - 02:14 PM

To appleoddity:
You wrote:
"I literally used EXACTLY the code I posted earlier, but I added your e-mail address to it to receive the contact form."
Please note: Following (Part 2:) is the exact same code (plus highlighted in bold fonts is the area that I changed to the email address (Where applicant's information is to be sent via email) as well as the other area that I changed to the URL of the "Thank You" page). I posted it earlier online and the results were sadly as follows:
Posted Image
____________________________________________________________________
Part 2:
[quote]<?php

$to = "nyhc@nowhere.com"; // Place your e-mail address here -- This will remain hidden

$subject = "Home Care Application"; // Subject of e-mail you will receive
$from = $_REQUEST['T16']; // Applicant's e-mail address from form.
$headers = "From: $from"; // 'From address' of e-mail you receive (from form)

/* Load values from form into array.
The value on the left in brackets is the name of the value from the form.
The value on the right in quotes is what will be used to identify the data in the e-mail.
i.e. Your e-mail will say - First Name: <data from form>, etc... */

$fields = array();
$fields{"T2"} = "First Name";
$fields{"T3"} = "Last Name";
$fields{"T4"} = "Middle";
$fields{"T5"} = "Date of birth";
$fields{"T6"} = "Address1";
$fields{"T7"} = "Address2";
$fields{"T8"} = "City";
$fields{"T9"} = "State";
$fields{"T10"} = "Zip";
$fields{"T11"} = "Country";
$fields{"T12"} = "Home #";
$fields{"T13"} = "Cell #";
$fields{"T14"} = "Work #";
$fields{"T15"} = "Fax #";
$fields{"T16"} = "E-Mail";
$fields{"T17"} = "Time at Current Address";
$fields{"R1"} = "Citizen of";
$fields{"T18"} = "Other Country";
$fields{"SocCard"} = "Has SS Card";
$fields{"GreenCard"} = "Has green card";
$fields{"UsaEmployable"} = "USA Employable";
$fields{"NYLicense"} = "NY Drivers License";
$fields{"T19"} = "Max. time ever employed";
$fields{"Monday"} = "Work Mondays";
$fields{"Tuesday"} = "Work Tuesdays";
$fields{"Wednesday"} = "Work Wednesdays";
$fields{"Thursday"} = "Work Thursdays";
$fields{"Friday"} = "Work Fridays";
$fields{"Saturday"} = "Work Saturdays";
$fields{"Sunday"} = "Work Sundays";
$fields{"fulltime"} = "Will Work Full-Time";
$fields{"parttime"} = "Will Work Part-Time";

// Build the body of the message from the form data
$body = "We have received the following information:\n\n"; foreach($fields as $a => $B){ $body .= sprintf("%20s: %s\n",$b,$_REQUEST[$a]); }

// Compose a confirmation e-mail (this will be sent back to the applicant)
$headers2 = "From: noreply@YourCompany.com"; // Change this to a no reply address at your company - the user will see this as the from address for the confirmation e-mail
$subject2 = "Home Care Application - Confirmation";
// Compose your message to the applicant here.
$autoreply = "Thank you for contacting us. Your application has been received. Somebody will get back to you as soon as possible, usualy within 48 hours. If you have any more questions, please consult our website at www.oursite.com";

if($from == '') {print "You have not entered an email, please go back and try again";}
else {
$send = mail($to, $subject, $body, $headers);
$send2 = mail($from, $subject2, $autoreply, $headers2);
if($send)
{header( "Location: /Thank_You.html" );}
else
{print "We encountered an error sending your mail, please notify webmaster@YourCompany.com"; } // Change to webmaster e-mail address
}

?>[quote]
________________________________________________________________
I'm pleasantly surprised to see............The web form code that you placed at the following URL appears to function (Except For: The CITIZENSHIP Section Fails to function properly) mostly good. appleoddity's_online_sample_form
Therefore, I respectfully request a copy of the EXACT code that you utilized for the actual web page that's currently located at the following URL:
"http://crystalpc.us/appform.html"

Note: I hope that after seeing the changed (Exactly where and what was changed) code I'll realize How-To do it myself.
PS. I'm currently utilizing web hosting on "Tripod". I'm beginning to wonder if their server simply doesn't (despite claims to the contrary) support this .PHP form code and or related functions.

Edited by Step_By_Step, 23 October 2009 - 04:06 PM.


#14 appleoddity

appleoddity

    SuperMember

  • Tech Team
  • 3,071 posts
  • Interests:Eating, Movies, Family, Church, Music, Volleyball, Softball, Poker, Computers, Electronics, Reading.

Posted 23 October 2009 - 04:38 PM

I think I see where the problem is and I am willing to help you get it resolved. As I stated earlier, I want you to learn from this experience and understand what we are doing, so I need to get down to some basics so that you have a better picture of what is going on here.

The whole thing that we have created here consists of three files: Initial_Contact.html, sendmail.php, and Thank_You.html.

The Initial_Contact.html file contains the HTML code to design your web form with all the text boxes and radio buttons.

The sendmail.php file contains the PHP program that I designed in order to handle the sending of the e-mail. The sendmail.php program (file) is executed by the Initial_Contact.html file when the user clicks, "Submit."

The Thank_You.html file is displayed by the sendmail.php file if the e-mail is successfully sent without issues.

I believe that you have mistakingly been trying to copy and paste the PHP code I gave you into the Initial_Contact.html file in one way or another.

The webserver decides what to do with each file based on the file extension. (i.e. .html and .php in this example) If the web server sees a .html file extension it will deliver the contents of the file, as is, to the user's web browser. If the web browser sees a .PHP file extension then it will "interpret" the file as a program. It will run the program, and whatever the program decides to do is what you will see. It does not deliver the contents of a .PHP file directly to the user's browsers. The only thing the user will see is what the PHP program tells it to see. In our case it will give an error message if no e-mail address was provided, or redirect the user to your Thank_You.html file if it is successful.

So, with that said, it is important that the code goes into the right files.

Earlier I provided the HTML file, and the PHP file. When I say "Copy and paste" that code into those files, I mean, open notepad and copy and paste the code exactly the way I provided it to you. So, for the HTML web form, you will copy and paste that code directly into a file named "Initial_Contact.html" and save it. Make sure notepad does not append a .txt to the file name by placing the filename in quotes. (i.e. "Initial_Contact.html")

Secondly, copy and paste the PHP code I provided into a new notepad file. Then, you can make the changes that need to be made so it works for you. So that you understand what changes to make I am going to provide the PHP code again below. Once the code has been modified as necessary you can save this file as "sendmail.php"

<?php

$to = "nyhc@nowhere.com"; // Place your e-mail address here -- This will remain hidden

$subject = "Home Care Application"; // Subject of e-mail you will receive
$from = $_REQUEST['T16']; // Applicant's e-mail address from form.
$headers = "From: $from"; // 'From address' of e-mail you receive (from form)

/* Load values from form into array.
The value on the left in brackets is the name of the value from the form.
The value on the right in quotes is what will be used to identify the data in the e-mail.
i.e. Your e-mail will say - First Name: <data from form>, etc... */

$fields = array();
$fields{"T2"} = "First Name";
$fields{"T3"} = "Last Name";
$fields{"T4"} = "Middle";
$fields{"T5"} = "Date of birth";
$fields{"T6"} = "Address1";
$fields{"T7"} = "Address2";
$fields{"T8"} = "City";
$fields{"T9"} = "State";
$fields{"T10"} = "Zip";
$fields{"T11"} = "Country";
$fields{"T12"} = "Home #";
$fields{"T13"} = "Cell #";
$fields{"T14"} = "Work #";
$fields{"T15"} = "Fax #";
$fields{"T16"} = "E-Mail";
$fields{"T17"} = "Time at Current Address";
$fields{"R1"} = "Citizen of";
$fields{"T18"} = "Other Country";
$fields{"SocCard"} = "Has SS Card";
$fields{"GreenCard"} = "Has green card";
$fields{"UsaEmployable"} = "USA Employable";
$fields{"NYLicense"} = "NY Drivers License";
$fields{"T19"} = "Max. time ever employed";
$fields{"Monday"} = "Work Mondays";
$fields{"Tuesday"} = "Work Tuesdays";
$fields{"Wednesday"} = "Work Wednesdays";
$fields{"Thursday"} = "Work Thursdays";
$fields{"Friday"} = "Work Fridays";
$fields{"Saturday"} = "Work Saturdays";
$fields{"Sunday"} = "Work Sundays";
$fields{"fulltime"} = "Will Work Full-Time";
$fields{"parttime"} = "Will Work Part-Time";

// Build the body of the message from the form data
$body = "We have received the following information:\n\n"; foreach($fields as $a => $B){ $body .= sprintf("%20s: %s\n",$b,$_REQUEST[$a]); }

// Compose a confirmation e-mail (this will be sent back to the applicant)
$headers2 = "From: noreply@YourCompany.com"; // Change this to a no reply address at your company - the user will see this as the from address for the confirmation e-mail
$subject2 = "Home Care Application - Confirmation";
// Compose your message to the applicant here.
$autoreply = "Thank you for contacting us. Your application has been received. Somebody will get back to you as soon as possible, usualy within 48 hours. If you have any more questions, please consult our website at www.oursite.com";

if($from == '') {print "You have not entered an email, please go back and try again";}
else {
$send = mail($to, $subject, $body, $headers);
$send2 = mail($from, $subject2, $autoreply, $headers2);
if($send)
{header( "Location: /Thank_You.html" );}
else
{print "We encountered an error sending your mail, please notify webmaster@YourCompany.com"; } // Change to webmaster e-mail address
}

?>


Now, there are some particular parts of this file to pay attention to. I have highlighted them in red.

I will go through each section and explain it.

The first section: $to = "nyhc@nowhere.com"; // Place your e-mail address here -- This will remain hidden

This is where you will enter the e-mail address you want the application sent to when it is submitted. This address will remain private.

$subject = "Home Care Application"; // Subject of e-mail you will receive

If you want to you can change the subject of the e-mail that you receive here.

$headers2 = "From: noreply@YourCompany.com"; // Change this to a no reply address at your company - the user will see this as the from address for the confirmation e-mail

Because this code is configured to send the user a brief confirmation message so that they know for sure the application was submitted, the above line is where you would provide a "no-reply" address. For example, when you receive an automated message from a company, many times the "from" address of the e-mail will say "noreply@somecompany.com." This is to signify that you should not reply to this e-mail address. Well, in your case you can put a noreply address here, and this is what the user will see as the "from" address in the confirmation e-mail they receive. This is an e-mail address that should not be valid. If your company had a website address, then use "noreply@yourcompanywebsite.com" or something similar. It is just to signify that the user should not click "reply" and if he does, it will fail. This is a public e-mail address, and again, should not even be a valid e-mail address.

$subject2 = "Home Care Application - Confirmation";

This is the "subject" of the confirmation e-mail the user will receive.

$autoreply = "Thank you for contacting us. Your application has been received. Somebody will get back to you as soon as possible, usualy within 48 hours. If you have any more questions, please consult our website at www.oursite.com";

This is the message the user will receive in the confirmation e-mail.

{header( "Location: /Thank_You.html" );}

This is the web page that will be displayed on success. You don't have to change this. This is using what is called a "relative" path. (Well, it is sort of relative, but lets just say it is for simplicity's sake) What it means is, by not putting the full URL of the site you are able to move these three files to any web server under any URL and it will continue to work. If you had hard coded in the tripod.com website address, then it would break as soon as you moved it somewhere else. In all actuality, this should actually be changed to just say "Location: Thank_You.html" and not have the leading /. So you can make that change. This will guarantee that it will work no matter where you upload these three files at, as long as all three files are in the same folder.

{print "We encountered an error sending your mail, please notify webmaster@YourCompany.com"; } // Change to webmaster e-mail address

Here is the message the user will receive if their is some kind of system problem and the e-mail fails. Here is where you would place the webmaster address. Usually this would be your address, so that they can send you a notification that there is a problem with your web site. This e-mail address will be public and should be something you don't mind getting spam at.

Now remember, PHP is a programming language with specific syntax and structure just like Basic, or C, or Pascal if you are familiar with that. You can only modify the stuff in RED. Any other change to the syntax will break it. All quotes, semi colons, etc. must remain. Once you are done making the changes save this file as sendmail.php.

It appears you already have the Thank_You.html file uploaded, so you don't need to worry about that.

All that is left to do is to transfer the two files you just created: Initial_Contact.html, and sendmail.php to your web server.

All should be well at that point.

EDIT: I know you said you didn't want a confirmation e-mail. That is ok. I think it is a good idea, because it is important you give someone a little notification that their application has been received and will be processed. If you want to remove that, let me know and I will show you what ot remove from the PHP script to stop that.

Edited by appleoddity, 23 October 2009 - 04:43 PM.

The help you have been given is free. If you have been happy with our help please consider donating to support this forum.

If you would like to say thanks for the help I have given you please View My Profile and Leave a Comment.
Your encouragement is welcome.


#15 Step_By_Step

Step_By_Step

    Authentic Member

  • Authentic Member
  • PipPip
  • 66 posts

Posted 23 October 2009 - 07:04 PM

Hi Appleoddity:
You wrote:

I believe that you have mistakingly been trying to copy and paste the PHP code I gave you into the Initial_Contact.html file in one way or another.

The webserver decides what to do with each file based on the file extension. (i.e. .html and .php in this example) If the web server sees a .html file extension it will deliver the contents of the file, as is, to the user's web browser. If the web browser sees a .PHP file extension then it will "interpret" the file as a program. It will run the program, and whatever the program decides to do is what you will see. It does not deliver the contents of a .PHP file directly to the user's browsers. The only thing the user will see is what the PHP program tells it to see. In our case it will give an error message if no e-mail address was provided, or redirect the user to your Thank_You.html file if it is successful.

So, with that said, it is important that the code goes into the right files.

After reading the above paragraph I began to think about the manner in which the Tripod web server (default) automatically sends regular members to a page where you (either type/or copy and paste) enter your code. On that page it mentions HTML and not PHP.
I tried changing the file name and eventually found another (Separate) page Tripods_PHP_Surprise Following is a picture of that page:
Posted Image
Tripod apparently has a completely separate page with a place to add code and its called: "scripteditor"
However, there's a catch.............Apparently it's Only Available to Deluxe Members.
In case your curious........Following is a picture of that page (My note appears in red):
Posted Image
I'm guessing I'll need to find another web hosting place.
___________________________________________
UPDATE:
___________________________________________
After demanding a lot of private information from me.........I was eventually allowed to open an account at another web hosting company only to be surprised by the following: Posted Image
"SMTP feature is disabled for all free hosting accounts. Mail scripts will not be able to send emails."
Note: This appears to be a potential problem.
Am I mistaken?
Should I try to build the web form here?

Edited by Step_By_Step, 23 October 2009 - 07:30 PM.

Related Topics



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users