Jump to content

My form suddenly don't work and i don't see error message just blank.


ok

Recommended Posts

hi guys.

 

what is the common problem while you are creating email form.

when you pressed the submit button then you see white screen only

no error message.

 

what is the factor of this problem?

 

<?php 
//catch values
$journal = $_POST['journal'];			
$tinvoice = $_POST['tinvoice'];			
$food = $_POST['food'];			
$foodcheck = $_POST['check'];		
$program = $_POST['program'];		
#$adventure21 = $_POST['adventure21'];			

echo "<b>JOURNAL: </b>". $journal;
echo "<br>";
echo "<b>T-SHIRT INVOICE: </b>". $tinvoice;
echo "<br>";
echo "<H2>T e s t </H2>";
#echo "<b>Adventure21 : </b>". $adventure21;

if ($journal == 'journal1') {
$journal_value = 'We are NOT bringing Journals!';
} elseif($journal == 'journal2') {
$journal_value = 'We ARE bringing Journals! They are optional for students; use in program and provide time for them if/when they are available.';
} elseif($journal == 'journal3') {
$journal_value = 'We ARE bringing Journals!  They are  required as part of a student grade; please make time for them in every class and program.';
}	else {
$journal_value = 'none selected';
}    

if ($tinvoice == 'invoice1') {
$tinvoice_value = 'Please include these T-Shirts on our school invoice !';
} elseif($tinvoice == 'invoice2') {
$tinvoice_value = 'Please invoice our school separately for these T-Shirts ';
}	else {
$tinvoice_value = 'none selected';
}    

if ($food == 'food1') {
$food_value = 'Last Day Sack Lunch; $3 per student. Brown bag lunches for consumption on bus or after return to school.';
} elseif($food == 'food2') {
$food_value = 'Last Day Hot Lunch; $4 per student. Served at 11am right before students board busses. ';
}	else {
$food_value = 'none selected';
}    

if ($foodcheck == 'check') {
$foodcheck_value = 'Nightly Snack ; $1 per student per evening. Served between 7:45pm and 8:30pm each evening. ';
}	else {
$foodcheck_value = 'not selected';
}    

//Assign environmental value.

$subject = "High Trails Contact Form";
$recepient = "test_us@yahoo.com";    
$contents = "##### TELL US YOUR SCHOOL INFORMATION  #####\n School:  "
. $_POST['School'] .    			
"\nContact Person:  " . $_POST['ContactPerson'] . 
"\nProgram Dates:  " . $_POST['ProgramDates'] . 
"\nEmail:  " . $_POST['Email'] .
"\nSite you are attending:  " . $_POST['Site'] .
"\nGrade of student:  " . $_POST['Grade0'] .
"\nNumber of boys attending:  " . $_POST['Boys'] .
"\nNumber of girls attending:  " . $_POST['Girls'] .

"\n\n##### ADULTS ATTENDING HIGH TRAILS #####" .
"\nAdult #1:  " . $_POST['Adult1'] .
"\nAdult Position #1:  " . $_POST['AdultPostion1'] .
"\nAdult #2:  " . $_POST['Adult2'] .
"\nAdult Position #2:  " . $_POST['AdultPostion2'] .
"\nAdult #3:  " . $_POST['Adult3'] .
"\nAdult Position #3:  " . $_POST['AdultPostion3'] .
"\nAdult #4:  " . $_POST['Adult4'] .
"\nAdult Position #4:  " . $_POST['AdultPostion4'] .
"\nAdult #5:  " . $_POST['Adult5'] .
"\nAdult Position #5:  " . $_POST['AdultPostion5'] .
"\nAdult #6:  " . $_POST['Adult6'] .
"\nAdult Position #6:  " . $_POST['AdultPostion6'] .
"\nAdult #7:  " . $_POST['Adult7'] .
"\nAdult Position #7:  " . $_POST['AdultPostion7'] .
"\nAdult #8:  " . $_POST['Adult8'] .
"\nAdult Position #8:  " . $_POST['AdultPostion8'] .

"\n\n##### ANY VISITORS COMING UP DURING THE WEEK? #####" .
"\nVisitor #1:  " . $_POST['Visitor1'] .
"\nVisitor Position #1:  " . $_POST['VisitorPosition1'] .
"\nVisitor #2:  " . $_POST['Visitor2'] .
"\nVisitor Position #2:  " . $_POST['VisitorPosition2'] .
"\nVisitor #3:  " . $_POST['Visitor3'] .
"\nVisitor Position #3:  " . $_POST['VisitorPosition3'] .
"\nVisitor #4:  " . $_POST['Visitor4'] .
"\nVisitor Position #4:  " . $_POST['VisitorPosition4'] .

"\n\n##### BACKGROUND LEVEL #####" .
"\nBACKGROUND: STUDENT ACADEMIC LEVEL:  " . $_POST['AcademicLevel'] .
"\nBACKGROUND: STUDENT EMOTIONAL LEVEL:  " . $_POST['EmotionalLevel'] .
"\nSPECIAL NEEDS, SPECIAL MEDICAL SITUATIONS, POTENTIAL DISCIPLINE ISSUES:  " . $_POST['SpecialNeeds'] .

"\n\n##### STUDENT JOURNALS #####\n:" .
$journal_value .

"\n\n##### T-SHIRTS #####" .
"\nAdult Small:  " . $_POST['tshirt1'] .
"\nAdult Medium:  " . $_POST['tshirt2'] .
"\nAdult Large:  " . $_POST['tshirt3'] .
"\nAdult XL:  " . $_POST['tshirt4'] .

"\n\n##### T-SHIRTS INVOICE #####" .
"\n:  " . $tinvoice_value .

"\n\n##### EXTRA FOOD #####" .
"\n:  " . $food_value .
"\n:  " . $foodcheck_value .

"\n\n##### DAYTIME CLASSES #####" .
"\n##### 3 DAY PROGRAM #####" .
"\n##### Adventure Classes #####" .
"\n:  " .  .
"\n:  " .  .
"\n:  " .  .
"\n:  " .  .
"\n##### Environmental Classes ##### " .
"\n:  " .  .
"\n:  " .  .
"\n:  " .  .
"\n:  " .  .

"\n\n##### 4 DAY PROGRAM #####" .
"\n##### Adventure Classes #####" .
"\n:  " .  .
"\n:  " .  .
"\n:  " .  .
"\n:  " .  .
"\n##### Environmental Classes ##### " .
"\n:  " .  .
"\n:  " .  .
"\n:  " .  .
"\n:  " .  .

"\n\n##### 5 DAY PROGRAM #####" .
"\n##### Adventure Classes #####" .
"\n:  " .  .
"\n:  " .  .
"\n:  " .  .
"\n:  " .  .
"\n##### Environmental Classes ##### " .
"\n:  " .  .
"\n:  " .  .
"\n:  " .  .
"\n:  " .  .;    


$headers = "Reply-to: test_us@yahoo.com\n";
mail($recepient, $subject, $contents, "From: test_us@yahoo.com");
?>

<?php
echo "<br><br><br>";
echo "<center>";
echo "<h2>Message sent!</h2>";
echo "</center>";

?>

 

thank you.

 

 

Link to comment
Share on other sites

The posted code contains a fatal parse error -

Parse error: syntax error, unexpected '.' in your_file.php on line 115

 

When learning php, developing php code, or debugging php code, do it on a development system with error_reporting set to E_ALL and display_errors set to ON in your php.ini to get php to help you. Stop and start your web server to get any changes made to php.ini to take effect. Turning these two settings on in your script won't work for parse errors because you script is never executed when there is a parse error.

 

Link to comment
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.