Jump to content

Recommended Posts

Okay, the intial page is called registration.html, which has code as following.

<form action="processor.php" method="post">
// ENTIRE FORM INSIDE HERE
</form>

 

As far as the processor.php this is the data in its entirety.

<html>
<head>
	<title>Cardio Inc. BootCamp Registration Confirmation</title>
	<style type="text/css" id="url">
		body
		{
			background-image: url(bg.jpg);
			background-repeat: no-repeat;
			background-attachment: fixed;
		}
		h1
		{
			color: Red;
		}
		div.Bootcamp
		{
			margin-left: auto;
			margin-right: auto;
			background-image: url(formbg.jpg);
			width: 850px;
			height: auto;
		}
		div.Bootcamp p
		{
        		font-size: 18px;
		}
	</style>
</head>
<body>

<?php
$to = "test@test.com";
$subject = "Bootcamp Registration";
$body = "
	Name: " . $_POST['txtName'] . " \n
	Address: " . $_POST['txtAddress'] .  " \n
	City: " . $_POST['txtCity'] . " \n
	State: " . $_POST['txtState'] . " \n
	ZIP: " . $_POST['txtZIP'] . " \n
	Profession: " . $_POST['txtProfession'] . " \n
	Date of Birth: " . $_POST['txtDOB'] . " \n
	Phone Number: " . $_POST['txtPhoneNumber'] . " \n
	Work Number: " . $_POST['txtWorkNumber'] . " \n
	Cell Number: " . $_POST['txtCellNumber'] . " \n
	Fax Number: " . $_POST['txtFaxNumber'] . " \n
	Email Address: " . $_POST['txtEmailAddress'] . " \n
	Reffered by: " . $_POST['txtRefferedBy'] . " \n
	Rate you current fitness level between 1 and 10:  " . $_POST['CurrentFitnessLevel'] . " \n
	How did you hear about us: " . $_POST['txtHearAboutUs'] . " \n
	Is this your first Cardio Inc. Boot Camp: " . $_POST['FirstBootCamp'] . " \n
	  If no, when was ou last camp:  " . $_POST['txtLastBootCamp'] . "\n
	What is your main goal for participating in this boot camp:\n
	  " . $_POST['txtareaGoalForParticipation'] . "\n\n

	Name of Emergency Contact: " . $_POST['txtEmergencyContactName'] . " \n
	Number of Emergency Contact: " . $_POST['txtEmergencyContactNumber'] . " \n\n

	<b>Medical History</b>\n\n

	1.  Please list any medications you are allergic to. ". $_POST['MedicationAllergies'] ."\n\n

	2.  Please list any prescribed medications that your on a perminant or semi-perminant basis: " . $_POST['PrescribedMedications'] ."\n\n

	3.  If you have a seizure disorder, please list medications: " . $_POSt['SeizureMedications'] . "\n\n

	4.  Do you have diabetes Adult or Juvenile? " . $_POST['DiabetesForm'] . "\n\n

	5.  Have you ever been found to be anemic (low blood count)? " . $_POST['Anemic'] . "\n\n

	6.  Do you take any medications for high blood presure (hypertension) " . $_POST['HighBloodPressureMedications'] . "\n\n

	7.  Do you have, or have you ever had, the following diseases? \n
		Heart Disease: " . $_POST['chkbxHeartDisease'] . "			Lung Disease: " . $_POST['chkbxLungDisease'] . "\n
		Kidney Disease: " . $_POST['chkbxKidneyDisease'] . "			Liver Disease: " . $_POST['chkbxLiverDisease'] . "\n\n

	8.  Do you take any medications for asthma? " . $_POST['AsthmaMedications'] . "\n\n

	9.  Have you ever had a severe neck injury? " . $_POST['HaveHadNeckInjury'] . "\n
		Description:  " . $_POST['NeckInjuryDescription'] . "\n\n

	10. Have you ever been knocked out? " . $_POST['HaveBeenKnockedOut'] . "\n
		Description: " . $_POST['NockedOutDescription'] . "\n\n

	11. Do you wear glasses or contact lenses? " . $_POST['ContactsGlasses'] . "\n

	12. Have you had a broken bone or fracture in the past 2 years? " . $_POST['HadBrokenFractureBone'] . "\n
		Description: " . $_POST['BrokenFractureBoneDescription'] . "\n\n

	13. Have you ever injured your back? " . $_POST['HadBackInjury'] . "\n
		Description: " . $_POST['BackInjuryDescription'] . "\n\n

	14. Do you have back pain? " . $_POST['BackPain'] . "\n\n

	15. Have you had knee pain in the past 2 years that has disabled you for longer than a week? " . $_POST['HadKneePains'] . "\n
		Description: " . $_POST['KneePainDescription'] . "\n\n

	16. Do you have other physical conditions which cause pain? " . $_POST['OtherPains'] . "\n
		Description: " . $_POST['OtherPainsDescription'] . "\n\n

	17. Detail any surgical procedures:\n
		" . $_POST['SurgecialProcedureDescriptions'] . "\n\n

	18. Have you ever experienced any type of heat illness (heat stroke or heat exhaustion)? " . $_POST['HadHeatIllness'] . "\n
		If yes, what type and when: " . $_POST['HeatIllnessDescription'] . "\n\n

	19. Are you training for a specific event? " . $_POST['TrainingForSpecificEvent'] . "\n
		Explain: " . $_POST['TrainingEventDescription'] . "\n\n

	" . $_POST['chkbxLanguageAgree'] . "  I agree not to use foul language during Boot Camp. Any violation will result in twenty push ups per occurrence.
	" . $_POST['chkbxWordsAgree'] . "  I agree not to eat or say the words Twinkie, Donuts, Ho-Ho's, Ding Dong, or Cup Cake during the course of Boot Camp. Any violation will result in twenty push ups per occurrence. \n
	" . $_POST['chkbxShowUpAgree'] . "  I agree to show up for Boot Camp every day unless it is an excused absence from my doctor or pre-approved with Boot Camp directors. Any violation will result in twenty push-ups per occurrence. \n
	" . $_POST['chkbxPhotosVideoAgree'] . "  I understand that photos or video may be taken during the course of my involvement in Boot Camp, which may be used for promotional purposes. I understand that my before & after photos will not be used for any promotional purposes unless I give written authorization.\n
	" . $_POST['chkbxSetAlarmAgree'] . "  I will remember to set my alarm and be at camp on time.\n
	" . $_POST['chkbxDietNutritionAgree'] . "  I understand that diet and nutrition will affect my fitness goals and performance during boot camp.\n
	" . $_POST['chkbxPositiveAttitudeAgree'] . "  I will bring a positive attitude, and expect to have fun.\n\n

	Signiture (Initials): " . $_POST['ElectronicSigniture'] . "      Date: " . $_POST['SignitureDate'] . "\n
";
if (mail($to, $subject, $body)) {
	echo("<p>Message successfully sent!</p>");
} else {
	echo("<p>Message delivery failed...  Please press the back button and try again.</p>");
}
?>

</body>
</html>

Link to comment
https://forums.phpfreaks.com/topic/128288-basic-php-help/#findComment-664531
Share on other sites

<form action="processor.php" enctype="multipart/form-data" method="post">
                <h1>General Information</h1>
                <table border="0" cellpadding="5" cellspacing="0">
                    <tr>
                        <td align="right">Name:</td>
                        <td align="left"><input id="txtName" type="text" /></td>
                    </tr>
                    <tr>
                        <td align="right">Address:</td>
                        <td align="left"><input id="txtAddress" type="text" /></td>
                    </tr>
                    <tr>
                        <td align="right">City:</td>
                        <td align="left"><input id="txtCity" type="text" /></td>
                    </tr>
                    <tr>
                        <td align="right">State:</td>
                        <td align="left"><input id="txtState" type="text" /></td>
                    </tr>
                    <tr>
                        <td align="right">ZIP:</td>
                        <td align="left"><input id="txtZIP" type="text" /></td>
                    </tr>
                    <tr>
                        <td align="right">Profession:</td>
                        <td align="left"><input id="txtProfession" type="text" /></td>
                    </tr>
                    <tr>
                        <td align="right">Date of Birth:</td>
                        <td align="left"><input id="txtDOB" type="text" /> (MM/DD/YYYY)</td>
                    </tr>
                    <tr>
                        <td align="right">Phone Number:</td>
                        <td><input id="txtPhoneNumber" type="text" /></td>
                    </tr>
                    <tr>
                        <td align="right">Work Number:</td>
                        <td align="left"><input id="txtWorkNumber" type="text" /></td>
                    </tr>
                    <<tr>
                        <td align="right">Cell Number:</td>
                        <td align="left"><input id="txtCellNumber" type="text" /></td>
                    </tr>
                    <tr>
                        <td align="right">Fax Number:</td>
                        <td align="left"><input id="txtFaxNumber" type="text" /></td>
                    </tr>
                    <tr>
                        <td align="right">Email Address:</td>
                        <td align="left"><input id="txtEmailAddress" type="text" /></td>
                    </tr>
                    <tr>
                        <td align="right">Reffered by:</td>
                        <td align="left"><input id="txtRefferedBy" type="text" /></td>
                    </tr>
                    <tr>
                        <td colspan="2" align="left">Rate your current fitness level between 1 and 10, 10 being great.  
                            <select id="CurrentFitnessLevel">
                                <option value="" selected="true"></option>
                                <option value="01">1</option>
                                <option value="02">2</option>
                                <option value="03">3</option>
                                <option value="04">4</option>
                                <option value="05">5</option>
                                <option value="06">6</option>
                                <option value="07">7</option>
                                <option value="08">8</option>
                                <option value="09">9</option>
                                <option value="10">10</option>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" align="left">How did you hear about us?  <input id="txtHearAboutUs" type="text" /></td>
                    </tr>
                    <tr>
                        <td colspan="2" align="left">Is this your first Cardio Bootcamp?  
                            <select id="FirstBootcamp">
                                <option value="No" selected="true">No</option>
                                <option value="Yes">Yes</option>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" align="left">If no, when was your last camp?  <input id="txtLastBootCamp" type="text" /></td>
                    </tr>
                    <tr>
                        <td colspan="2" align="left">
                            What is your main goal for participating in this boot camp?<br />
                            <textarea id="txtareaGoalForParticipation" cols="45" rows="10"></textarea>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" align="left">Name of Emergency Contact:  <input id="txtEmergencyContactName" type="text" /></td>
                    </tr>
                    <tr>
                        <td colspan="2" align="left">Number for Emergency Contact:  <input id="txtEmergencyContactNumber" type="text" /></td>
                    </tr>
                </table>
                <br />
                <h1>Medical History</h1>
                <table border="0" cellpadding="5" cellspacing="0">
                    <tr>
                        <td colspan="2" align="left"><i>IF YOU ARE A RETURNING PARTICIPANT, ONLY COMPLETE SECTIONS THAT HAVE CHANGED.</i></td>
                    </tr>
                    <tr>
                        <td colspan="2"></td>
                    </tr>
                    <tr>
                        <td colspan="2" align="left">
                            Please list any medications you are allergic to.<br />
                            <textarea id="MedicationAllergies" cols="45" rows="5"></textarea>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" align="left">
                            Please list any prescribed medications that your on a perminant or semi-perminant basis.<br />
                            <textarea id="PrescribedMedicatons" cols="45" rows="5"></textarea>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" align="left">
                            If you have a seizure disorder, please list medications.<br />
                            <textarea id="SeizureMedications" cols="45" rows="5"></textarea>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" align="left">
                            Do you have any form of diabetes?  
                            <select id="DiabetesForm">
                                <option value="None" selected="true">None</option>
                                <option value="Juvenile">Juvenile</option>
                                <option value="Adult">Adult</option>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" align="left">
                            Have you even been found to be anemic (low blood count)?  
                            <select id="Anemic">
                                <option value="No" selected="true">No</option>
                                <option value="Yes">Yes</option>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" align="left">
                            Do you take any medications for high blood presure (hypertension)?  If yes, please list.<br />
                            <textarea id="HighBloodPresureMedications" cols="45" rows="5"></textarea>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" align="left">
                            Do you, or have ou ever had, any of the follwoing diseases? Select all that apply.<br />
                               <input id="chkbxHeartDisease" type="checkbox" /> <i>Heart Disease</i><br />
                               <input id="chkbxKidneyDisease" type="checkbox" /> <i>Kidney Disease</i><br />
                               <input id="chkbxLungDisease" type="checkbox" /> <i>Lung Disease</i><br />
                               <input id="chkbxLiverDisease" type="checkbox" /> <i>Liver Disease</i><br />
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" align="left">
                            Do you take any medications for asthma?  Please list.<br />
                            <textarea id="AsthmaMedications" cols="45" rows="5"></textarea>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" align="left">
                            Have you ever had a severe neck injury?  
                            <select id="HaveHadNeckInjury">
                                <option value="No">No</option>
                                <option value="Yes">Yes</option>                        
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" align="left">
                                <i>If so, describe:</i><br />
                                <textarea id="NeckInjuryDescription" cols="40" rows="5"></textarea>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" align="left">
                            Have you ever been nocked out?  
                            <select id="HaveBeenNockedOut">
                                <option value="No">No</option>
                                <option value="Yes">Yes</option>                        
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" align="left">
                                <i>If so, describe:</i><br />
                                <textarea id="NockedOutDescription" cols="40" rows="5"></textarea>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" align="left">
                            Do you wear contact lenses or glasses?  
                            <select id="ContactsGlasses">
                                <option value="No">No</option>
                                <option value="Contacts">Contacts</option>
                                <option value="Glasses">Glasses</option>
                                <option value="Both">Both</option>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" align="left">
                            Have you ever had a broken bone or fracture in the past 2 years?  
                            <select id="HadBrokenFractureBone">
                                <option value="No">No</option>
                                <option value="Yes">Yes</option>                        
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" align="left">
                                <i>If so, describe:</i><br />
                                <textarea id="BrokenFractureBoneDescription" cols="40" rows="5"></textarea>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" align="left">
                            Have you ever injured your back?  
                            <select id="HadBackInjury">
                                <option value="No">No</option>
                                <option value="Yes">Yes</option>                        
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" align="left">
                                <i>If so, describe:</i><br />
                                <textarea id="BackInjuryDescription" cols="40" rows="5"></textarea>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" align="left">
                            Do you have pack pain? <i>Pick one.</i>  
                            <select id="BackPain">
                                <option value="Never">Never</option>
                                <option value="Seldom">Seldom</option>
                                <option value="Occassionally">Occassionally</option>
                                <option value="Frequently">Frequently</option>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" align="left">
                            Have you ever had knee pain in the past 2 yaers that has disabled you for longer than a week?  
                            <select id="HadKneePains">
                                <option value="No">No</option>
                                <option value="Yes">Yes</option>                        
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" align="left">
                                <i>If so, describe:</i><br />
                                <textarea id="KneePainDescription" cols="40" rows="5"></textarea>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" align="left">
                            Do you have other physical conditions which cause pain?  
                            <select id="OtherPains">
                                <option value="No">No</option>
                                <option value="Yes">Yes</option>                        
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" align="left">
                                <i>If so, describe:</i><br />
                                <textarea id="OtherPainsDescription" cols="40" rows="5"></textarea>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" align="left">
                            Detial any surgecial procedures:<br />
                            <textarea id="SurgecialProcedureDescriptions" cols="45" rows="10"></textarea>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" align="left">
                            Have you ever experienced any type of heat illness (heat stroke or heat exhaustion)?  
                            <select id="HadHeatIllness">
                                <option value="No">No</option>
                                <option value="Yes">Yes</option>                        
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" align="left">
                                <i>If so, describe:</i><br />
                                <textarea id="HeatIllnessDescription" cols="40" rows="5"></textarea>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" align="left">
                            Are you training for a specific event?  
                            <select id="TrainingForSpecificEvent">
                                <option value="No">No</option>
                                <option value="Yes">Yes</option>                        
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" align="left">
                                <i>If so, describe:</i><br />
                                <textarea id="TrainingEventDescription" cols="40" rows="5"></textarea>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2"></td>
                    </tr>
                </table>
                <br />
                <h1>Release</h1>
                <table border="0" cellpadding="5" cellspacing="0">
                    <tr>
                        <td colspan="2" align="left">
                            <p>
                                <b>Notice:</b>  It is wise to seek your doctor's advice beginning any health/fitness/nutrition program.
                            </p>
                            <p>
                                This release is entered into between the undersigned and Cardio Inc, LLC, its officers, subsidiaries, <br />
                                affiliates, and executors.  The purpose of Cardio Inc Boot Camp is to provide fitness instructions and <br />
                                coaching for various leveles of atheletes/individuals.<br /><br />
                                The undersinged hereby acknowledge that the following was explained to me and/or agree to the following:
                            </p>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" align="left">
                            <div class="terms">
                                <table border="0" cellpadding="3" cellspacing="0">
                                    <tr>
                                        <td valign="top" align="left">I.</td>
                                        <td align="left">
                                            Acknowledges that Cardio Inc Boot Camp instructors are not physicians and are not trained in any way to provide medical diagnosis, medical treatment, or any other type of medical advice. 
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="2" align="left"></td>
                                    </tr>
                                    <tr>
                                        <td valign="top" align="left">II.</td>
                                        <td align="left">
                                            Acknowledges that coaching/training is another tool for teaching athletes/individuals about themselves, but that Cardio Inc Boot Camp does not guarantee neither good nor bad will occur nor guarantees the training advice given by Cardio Inc Boot Camp instructors nor Cardio Inc  Boot Camp will produce good nor bad results.
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="2" align="left"></td>
                                    </tr>
                                    <tr>
                                        <td valign="top" align="left">III.</td>
                                        <td align="left">
                                            Acknowledges that the undersigned has been told if they feel tired, feel pain or feel out of the ordinary in any way either related to your training, or otherwise, that the undersigned should contact a physician at once. 
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="2" align="left"></td>
                                    </tr>
                                    <tr>
                                        <td valign="top" align="left">IV.</td>
                                        <td align="left">
                                            Acknowledges that boot camps, aerobic classes, kick boxing, running, weight training, obstacle courses, and any other related sports are an extreme test of one's mental and physical limits and carry with it potential for damage or loss of property, serious injury and death. That the undersigned assumes the risks of participating in these types of events/activities including the elements of a natural environment, that they are fit, and they have a regular medical physician they can contact regarding any medical problems that they might develop. The undersigned expressly waive, release, discharge and agree not to sue from any liability of death, disability, personal injury, or action of any kind Cardio Inc Boot Camp for the undersigned participating in said sporting events and/or training for said sporting events.<br /><br />
                                            The Undersigned agrees that this is the full agreement between the parties, that Cardio Inc Boot Camp including neither its instructors nor anyone else has not verbally contradicted any of the terms of this release and that the undersigned has entered into this agreement free and voluntarily without force or coercion.<br /><br />
                                            Customer client agrees to confidentiality with respect to Cardio Inc Boot Camp and all services provided by same. The undersigned agrees to refrain from disclosing, directly or indirectly, any and all aspects of Cardio Inc Boot Camp.  The undersigned agrees to a non-compete within a 50 mile radius of Wichita Falls for a period of 5 years from date of participation. 

                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </td> 
                    </tr>
                    <tr>
                        <td align="left">
                            <table border="0" cellpadding="5" cellspacing="5">
                                <tr>    
                                    <td align="left">
                                        <input id="chkbxLanguageAgree" type="checkbox" />
                                    </td>
                                    <td align="left">
                                        <p>I agree not to use foul language during Boot Camp. Any violation will result in twenty push ups per occurrence.</p>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="left">
                                        <input id="chkbxWordsAgree" type="checkbox" />
                                    </td>
                                    <td align="left">
                                        <p>I agree not to eat or say the words Twinkie, Donuts, Ho-Ho's, Ding Dong, or Cup Cake during the course of<br /> Boot Camp. Any violation will result in twenty push ups per occurrence.</p>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="left">
                                        <input id="chkbxShowUpAgree" type="checkbox" />
                                    </td>
                                    <td align="left">
                                        <p>I agree to show up for Boot Camp every day unless it is an excused absence from my doctor or pre-approved<br /> with Boot Camp directors. Any violation will result in twenty push-ups per occurrence.</p>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="left">
                                        <input id="chkbxPhotosVideoAgree" type="checkbox" />
                                    </td>
                                    <td align="left">
                                        <p>I understand that photos or video may be taken during the course of my involvement in Boot Camp, which may<br /> be used for promotional purposes. I understand that my "before & after" photos will not be used for any<br /> promotional purposes unless I give written authorization.</p>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="left">
                                        <input id="chkbxSetAlarmAgree" type="checkbox" />
                                    </td>
                                    <td align="left">
                                        <p>I will remember to set my alarm and be at camp on time.</p>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="left">
                                        <input id="chkbxDietNutritionAgree" type="checkbox" />
                                    </td>
                                    <td align="left">
                                        <p>I understand that diet and nutrition will affect my fitness goals and performance during boot camp.</p>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="left">
                                        <input id="chkbxPositiveAttitudeAgree" type="checkbox" />

                           

Link to comment
https://forums.phpfreaks.com/topic/128288-basic-php-help/#findComment-664548
Share on other sites

No I didn't really use test@test.com .  I put in my email.

 

I tried it before with this:

<?php

 

$to="matt@qwerty.com";

$subject="Test";

$message="This is a test.";

 

mail($to,$subject,$message);

?>

 

This worked and sent me a test email.  What could I possibly be doing wrong with my detailed email?

Link to comment
https://forums.phpfreaks.com/topic/128288-basic-php-help/#findComment-664616
Share on other sites

Okay, so I wasn't paying attention and I switched two letter in my email address. Hence why I wasn't getting the email.  Oops... How can I bold, Italicize, etc. In the PHP script to email.  Not sure if it could even be done but just wanted to check.  Also, I have multiple CheckBoxes on my site.  Whenever I use them, it shows them as "on" or "off" when referencing them for the email.  Can I change that to maybe "yes" or "no"???

Link to comment
https://forums.phpfreaks.com/topic/128288-basic-php-help/#findComment-665129
Share on other sites

Thank you sooo much... Now I'm having issues whenever I'm echoing.

 

this is what i have for my echo.

 


if(mail($to,$subject,&body))
{
    echo("<p><div align="center"><input type="submit" name="btnPayNow" value="Make Full Payment"  id="ctl00_ctl00_ContentPlaceHolder1_ContentPlaceHolder1_gdPaymentButton_ctl02_GraphicButton" style="Color:Transparent;font-size:14Px;font-family:Times New Roman,Arial,Helvetica, sans-serif;font-weight:bold;font-style:;background-color:Red" onclick="javascript:window.open('https://paysimple.biz/Customer/LoginCustomer.aspx?FID=595&Digest=vywTGI+IsJpFs5n1MX2f0w&amt=216.49');return false;"/>   <input type="submit" name="btnPayNow" value="Payment Installments"  id="ctl00_ctl00_ContentPlaceHolder1_ContentPlaceHolder1_gdPaymentButton_ctl02_GraphicButton" style="Color:Transparent;font-size:14Px;font-family:Times New Roman,Arial,Helvetica, sans-serif;font-weight:bold;font-style:;background-color:Red" onclick="javascript:window.open('https://paysimple.biz/Customer/LoginCustomer.aspx?FID=595&Digest=vywTGI+IsJpFs5n1MX2f0w&amt=108.25');return false;"/></div></p>");
}
else{
  echo("Your registration failed.  Please click the back button and try again.");
}

Link to comment
https://forums.phpfreaks.com/topic/128288-basic-php-help/#findComment-665546
Share on other sites

You have unescaped double quotes inside a string delimited by double quotes. Either escape them with a backslash or surround your string in single quotes and escape the single quotes.

I prefer the later, since there are less single quotes in the string

<?php
if(mail($to,$subject,&body))
{
    echo '<p><div align="center"><input type="submit" name="btnPayNow" value="Make Full Payment"  id="ctl00_ctl00_ContentPlaceHolder1_ContentPlaceHolder1_gdPaymentButton_ctl02_GraphicButton" style="Color:Transparent;font-size:14Px;font-family:Times New Roman,Arial,Helvetica, sans-serif;font-weight:bold;font-style:;background-color:Red" onclick="javascript:window.open('https://paysimple.biz/Customer/LoginCustomer.aspx?FID=595&Digest=vywTGI+IsJpFs5n1MX2f0w&amt=216.49');return false;"/>   <input type="submit" name="btnPayNow" value="Payment Installments"  id="ctl00_ctl00_ContentPlaceHolder1_ContentPlaceHolder1_gdPaymentButton_ctl02_GraphicButton" style="Color:Transparent;font-size:14Px;font-family:Times New Roman,Arial,Helvetica, sans-serif;font-weight:bold;font-style:;background-color:Red" onclick="javascript:window.open(\'https://paysimple.biz/Customer/LoginCustomer.aspx?FID=595&Digest=vywTGI+IsJpFs5n1MX2f0w&amt=108.25\');return false;"/></div></p>';
}
else{
  echo "Your registration failed.  Please click the back button and try again.";
}?>

 

BTW, you don't need the to surround the string you're echoing with parenthesis.

 

Ken

Link to comment
https://forums.phpfreaks.com/topic/128288-basic-php-help/#findComment-665575
Share on other sites

The data that I'm collecting is only going to be emailed.  What I'm trying to show in the echo is some text if the email was successful or not.  If it was i want to tell them what they need to do next and if it wasn't then tell them to try submiting it again.

 

Any ideas?

Link to comment
https://forums.phpfreaks.com/topic/128288-basic-php-help/#findComment-665853
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.