Jump to content

a diffrent Form Error


JimKI

Recommended Posts

I have this form that comes up with this error below is the form and hear is the error Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 35 bytes) in /usr/www/users/buzgate/e-learning2/ten/ten_steps_feedback2.php on line 101 The line 101 is in redhere is the code<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><META NAME="robots" CONTENT="noindex,nofollow"><link href="/8.0/styles/_e-learning.css" rel="stylesheet" type="text/css" /></head><body background="/images/background.jpg"><div id="container" align="center"><div id="header"><p class="tenTitle">Step 10 Summary </p></div><div id="main"> <p id="stepTitle"><br /> Feedback and Graduation</p><a name="result"></a><?php // NAME STEP, GIVE NUMBER OF QUESTIONS AND GIVE VALUE TO QUESTION VARIABLES SO ERROR CHECKING DOES NOT HAVE TO BE RECREATED FOR EVERY PAGE $stepNumber = 'Feedback'; $numQuestions = '9'; $questions = array(1 => '1. The self-assessment exercises helped me to:', '2. My business idea is to provide what product and/or service:', '3. I plan to sell what to who and why: ', '4. What are your management strengths and what skills, if any, will you seek help with:', '5. My business will succeed because:', '6. My operation will breakeven when and why:', '7. I plan to finance my business how:', '8. The three most useful external business assistance agencies for me are:', '9. Three of the near term business development action items I plan to do are:' ); $numQuestions2 =1; $numQuestions2 = array(1 => '10. I plan to launch my venture:'); // GIVE NUMBER OF RADIO BOX OPTIONS AND THEIR NAMES $numOptions = 5; $options = array(1 => '< 6-months', '> 6 months - 1 year', '> 1 - 2 years', '> 2 - 5 years', 'Never'); //ADD QEUSTIONS AND ANSWERS TO $EMAIL_BODY AND $EMAIL_BODYCC BELOW // IF FORM WAS SUBMITTED, MOVE ON TO NEXT STEP (ERROR CHECKING) if(isset($_POST['submit'])) { // CHECK FOR MISSING DATA (ERROR CHECKING) for ($i = 1; $i <= $numQuestions; $i++) { if (empty($_POST['data'.$i])) { $problem = TRUE; $dataSpan[$i] = '<span style="color:red; font-weight:bold;">'.$questions[$i].'</span>'; } else { $dataSpan[$i] = $question[$i]; } } for ($i = 1; $i <= $numQuestions2; $i++) { if (empty($_POST['radio'.$i])) { $problem = TRUE; $dataSpan2[$i] = '<span style="color:red; font-weight:bold;">'.$options[$i].'</span>'; } else { $dataSpan2[$i] = $options[$i]; } } if (empty($_POST['email'])) { $problem = TRUE; $emailSpan = '<span style="color:red; font-weight:bold;">*Your email address</span>'; } else { $emailSpan = '*Your email address'; } if (!empty($_POST['emailCc']) && (empty($_POST['name']))) { $problem = TRUE; $nameSpan = '<span style="color:red; font-weight:bold;">Your Name</span>'; } else { $nameSpan = 'Your Name'; } // IF MISSING DATA, PREPARE TO DISPLAY FORM. IF NO MISSING DATA, MOVE ON TO NEXT STEP (THANK YOU, SEND EMAILS AND LINK TO NEXT FORM) if ($problem == TRUE) { $display = TRUE; } else { $display = FALSE; } } // IF THE FORM IS NOT BEING SUBMITTED (FIRST VISIT TO PAGE), SET THE // FORM DISPLAY VARIABLE TO TRUE AND DEFINE VALUES OF DATA#SPAN VARIABLES (QUESTIONS) else { $display = TRUE; for ($i = 1; $i <= $numQuestions; $i++) { $dataSpan[$i] = $questions[$i]; } for ($i = 1; $i <= $numQuestions2; $i++) { $dataSpan2[$i] = $options[$i]; } $emailSpan = '*Your email address'; $nameSpan = 'Your Name'; } if ($problem == TRUE) { print '<div id="tenForm"><p><strong>Congratulations!</strong>You have completed the last step in the 10-Step Venture Success learning program. <p>Having participated fully, you should now...</p> <ul> <li>Have a strong sense of how to move with your business strategy,</li> <li>Know your strengths and what you need to do to further progress, and</li> <li>Understand that there is a broad network of people, programs and resources available to support you along the way!</li> </ul> <p>As a first step to building your future support network, please provide us with the following information. This information will kept in strict confidence <a href="http://www.buzgate.org/8.0/nh/about_privacy.html" target="_blank">view privacy policy</a> and permits us to:</p> <ol><li>Validate your training</li> <li>Mail your graduation certificate to you</li> <li>Reconnect with you in the future to learn of your progress</li></ol>'; $_POST['email'] = $_SESSION['email']; $_POST['emailCc'] = $_SESSION['emailCc']; $_POST['name'] = $_SESSION['name']; print '<br clear="all" /> <p>* Required fields are marked with an asterisk<br> *First Name<br /> <input type="text" size="40" maxlength="100" name="yourFname" class="required" value="' . $_POST['yourFname'] . '" /> </p><p> *Last Name<br /> <input type="text" size="40" maxlength="100" name="yourLname" class="required" value="' . $_POST['yourLname'] . '" /> </p><p> Title<br /> <input type="text" size="40" maxlength="100" name="yourTitle" class="required" value="' . $_POST['yourTitle'] . '" /> </p><p> Company Name<br /> <input type="text" size="40" maxlength="100" name="yourCname" class="required" value="' . $_POST['yourCname'] . '" /> </p><p> *Address 1<br /> <input type="text" size="40" maxlength="100" name="yourAddress1" class="required" value="' . $_POST['yourAddress1'] . '" /> </p><p> Address 2<br /> <input type="text" size="40" maxlength="100" name="yourAddress2" class="required" value="' . $_POST['yourAddress2'] . '" /> </p><p> *City<br /> <input type="text" size="40" maxlength="100" name="yourCity" class="required" value="' . $_POST['yourCity'] . '" /> </p><p> *State<br /> <input type="text" size="40" maxlength="100" name="yourState" class="required" value="' . $_POST['yourState'] . '" /> </p><p> *Zip/Postal Code<br /> <input type="text" size="40" maxlength="100" name="yourZip" class="required" value="' . $_POST['yourZip'] . '" /> </p><p> Telephone<br /> <input type="text" size="40" maxlength="100" name="yourPhone" class="required" value="' . $_POST['yourPhone'] . '" /> </p><p> *Your email address<br /> <input type="text" size="40" maxlength="100" name="yourFname" class="required" value="' . $_POST['yourFname'] . '" /> </p> <p> *Briefly share comments below regarding each of the 10-Step Venture Success exercises:<br /> <form method="POST" name="contact_form" action="ten_steps_feedback2.html"> <table border="0" cellpadding="4" cellspacing="3" align="center">'; for ($i = 1; $i <= $numQuestions; $i++) { echo '<tr> <td align="left" valign="top" border="0"> <p>'.$dataSpan[$i].'</p> <textarea rows="5" cols="48" id="data'.$i.'" name="data'.$i.'">'.$_POST['data'.$i].'</textarea> </td> </tr>'; for ($i = 1; $i <= $numQuestions2; $i++) { echo '<tr> <td align="left" valign="top" border="0"> <p>'.$dataSpan2[$i].'</p>'; for ($j = 1; $j <= $numOptions; $j++) { $elemID = "radio" . $i . "_" . $j; $elemName = "radio" . $i; $chk = ""; if(isset($_POST[$elemName])) { if($_POST[$elemName] == ((string) $j)) { $chk = "CHECKED"; } } echo "<input type=\"radio\" id=\"$elemID\" name=\"$elemName\" $chk value=\"$j\">$options[$j]\n"; } print '</li></td> </tr>'; } print '</table> *Anti-Spam code Check here to receive copy of this form at the above email address Keep me informed with regular business assistance resource updates <table border="0" cellpadding="3" cellspacing="2" align="center"> <td class="submitCell" align="center"> <input type="reset" value="Clear" /> <input type="submit" name="submit" value="Submit" /><br /> <a href="'.$filePathState.'about_privacy.html" target="_blank"><span style="font-size:9px;">View our privacy policy</span></a> </td> </tr></table> </form>'; } // DEFINE VARIABLES FOR MAILING TO USER AND BUZGATE $to = 'askbuz@buzgate.org,'.$_POST['email']; $email_subject = "Step ".$stepNumber." in Buzgate's Ten Step Program"; for ($i = 1; $i <= $numQuestions; $i++) { $eBodyQuestions .= $questions[$i]."\n" .$options[$_POST['radio'.$i]]."\n"; } $email_body = $email_body.$eBodyQuestions.$eBodyQuestions2; $headers = "From:".$_POST['email']; //PLACE VARIABLES IN MAIL FUNCTION mail($to, $email_subject, $email_body, $headers); // DEFINE VARIABLES FOR MAILING TO USER AND BUZGATE $toCc = $_POST['emailCc']; $email_subjectCc = "Step ".$stepNumber." in Buzgate's Ten Step Program from ".$_POST['name']; $email_bodyCc = $_POST['name']." has sent this to you from www.BUZGate.org/8.0/".$state_abbrv_low."/".$page_name."\n Please contact us at askbuz@buzgate.org if you have received this in error. "; $email_bodyCc = $email_bodyCc.$eBodyQuestions2; $headersCc = "From:askbuz@buzgate.org"; //PLACE VARIABLES IN CC MAIL FUNCTION mail($toCc, $email_subjectCc, $email_bodyCc, $headersCc); //Place variables in mail funciton mail($to, $email_subject, $email_body, $headers); // DISPLAY RESPONSE TO CORRECTLY FILLING OUT FORM echo "<p>Thank you and best wishes for success with your future endeavors.Dr. William R. OsgoodAuthor, 10-Step Venture Success Program</p>"; }?></div></div></body></html>

Link to comment
Share on other sites

It sounds like you have an infinite loop. Does the error appear immediately or after several seconds? It's hard to see the structure of the code to identify problems, if you could post that in a code box with indentation that would probably help. Code outside of a code box does not retain indentation.

Link to comment
Share on other sites

$numQuestions2 is an array. From the sound of it, all numbers are strictly smaller than arrays in PHP.

Link to comment
Share on other sites

I need help finding my problem the form doesn't show up only the title and the background of the page?

[center]Step 10 Summary    Feedback and Graduation	// NAME STEP, GIVE NUMBER OF QUESTIONS AND GIVE VALUE TO QUESTION VARIABLES SO ERROR CHECKING DOES NOT HAVE TO BE RECREATED FOR EVERY PAGE	$stepNumber = 'Feedback';	$numQuestions = '9';	$questions = array(1 => '1.	The self-assessment exercises helped me to:',				'2. My business idea is to provide what product and/or service:',				'3. I plan to sell what to who and why:  ',				'4. What are your management strengths and what skills, if any, will you seek help 			                    with:',								'5. My business will succeed because:',								'6. My operation will breakeven when and why:',								'7. I plan to finance my business how:',								'8. The three most useful external business assistance agencies for me are:',								'9. Three of the near term business development action items I plan to do are:'										);		$numQuestions2 = '1';	$numQuestions2  = array(1 => '10. I plan to launch my venture:');							// GIVE NUMBER OF RADIO BOX OPTIONS AND THEIR NAMES	$numOptions 		= 5;	$options = array(1 => 	'< 6-months',				'> 6 months - 1 year',				'> 1 - 2 years',				'> 2 - 5 years',				'Never');	  //ADD QEUSTIONS AND ANSWERS TO $EMAIL_BODY AND $EMAIL_BODYCC BELOW		// IF FORM WAS SUBMITTED, MOVE ON TO NEXT STEP (ERROR CHECKING)	if(isset($_POST['submit'])) {		// CHECK FOR MISSING DATA (ERROR CHECKING)		for ($i = 1; $i <= $numQuestions; $i++) {			if (empty($_POST['data'.$i])) {				$problem = TRUE;				$dataSpan[$i] = ''.$questions[$i].'';			}			else {				$dataSpan[$i] = $question[$i];			}		}		for ($i = 1; $i <= $numQuestions2; $i++) {			if (empty($_POST['radio'.$i])) {				$problem = TRUE;				$dataSpan2[$i] = ''.$options[$i].'';			}			else {				$dataSpan2[$i] = $options[$i];			}		}				if (empty($_POST['email'])) {			$problem = TRUE;			$emailSpan = '*Your email address';		}		else {			$emailSpan = '*Your email address';		}				if (!empty($_POST['emailCc']) && (empty($_POST['name']))) {			$problem = TRUE;			$nameSpan = 'Your Name';		}		else {			$nameSpan = 'Your Name';		}				// IF MISSING DATA, PREPARE TO DISPLAY FORM. IF NO MISSING DATA, MOVE ON TO NEXT STEP (THANK YOU, SEND EMAILS AND LINK TO NEXT FORM)		if ($problem == TRUE) {			$display = TRUE;		}		else {			$display = FALSE;		}	}	// IF THE FORM IS NOT BEING SUBMITTED (FIRST VISIT TO PAGE), SET THE	// FORM DISPLAY VARIABLE TO TRUE AND DEFINE VALUES OF DATA#SPAN VARIABLES (QUESTIONS)	else {				$display = TRUE;		for ($i = 1; $i <= $numQuestions; $i++) {			$dataSpan[$i] = $questions[$i];		}				for ($i = 1; $i <= $numQuestions2; $i++) {			$dataSpan2[$i] = $options[$i];		}		$emailSpan = '*Your email address';		$nameSpan = 'Your Name';	}		if ($problem == TRUE) {		print '[b]Congratulations![/b]You have completed the last step in the 10-Step Venture Success learning program.		Having participated fully, you should now...			[list][*]Have a strong sense of how to move with your business strategy,			[*]Know your strengths and what you need to do to further progress, and			[*]Understand that there is a broad network of people, programs and resources available to support you along the way![/list]			As a first step to building your future support network, please provide us with the following information. This information will kept in strict confidence <a href="http://www.buzgate.org/8.0/nh/about_privacy.html" target="_blank">view privacy policy and permits us to:		[list=1][*]Validate your training		[*]Mail your graduation certificate to you		[*]Reconnect with you in the future to learn of your progress[/list]';				$_POST['email'] = $_SESSION['email'];		$_POST['emailCc'] = $_SESSION['emailCc'];		$_POST['name'] = $_SESSION['name'];				print '				* Required fields are marked with an asterisk		*First Name					*Last Name					Title					Company Name					*Address 1					Address 2					*City					*State					*Zip/Postal Code					Telephone					*Your email address										*Briefly share comments below regarding each of the 10-Step Venture Success exercises:				';							for ($i = 1; $i <= $numQuestions; $i++) {			echo '		    					'.$dataSpan[$i].'					'.$_POST['data'.$i].'							';								for ($i = 1; $i <= $numQuestions2; $i++) {			echo '		    					'.$dataSpan2[$i].'';					for ($j = 1; $j <= $numOptions; $j++) {						$elemID = "radio" . $i . "_" . $j;						$elemName = "radio" . $i;						$chk = "";						if(isset($_POST[$elemName])) {							if($_POST[$elemName] == ((string) $j)) {								$chk = "CHECKED";							} 						}						echo "$options[$j]\n";					}				print '			';		}		print '				*Anti-Spam code	Check here to receive copy of this form at the above email address	Keep me informed with regular business assistance resource updates						            								  [url="http://%27.$filePathState.%27about_privacy.html"]View our privacy policy[/url]      				';	}					// DEFINE VARIABLES FOR MAILING TO USER AND BUZGATE		$to = 'askbuz@buzgate.org,'.$_POST['email'];		$email_subject = "Step ".$stepNumber." in Buzgate's Ten Step Program";						for ($i = 1; $i <= $numQuestions; $i++) {			$eBodyQuestions .= $questions[$i]."\n"		.$options[$_POST['radio'.$i]]."\n";		}				$email_body = $email_body.$eBodyQuestions.$eBodyQuestions2;		$headers = "From:".$_POST['email'];			//PLACE VARIABLES IN MAIL FUNCTION		mail($to, $email_subject, $email_body, $headers);			// DEFINE VARIABLES FOR MAILING TO USER AND BUZGATE		$toCc = $_POST['emailCc'];		$email_subjectCc = "Step ".$stepNumber." in Buzgate's Ten Step Program from ".$_POST['name'];		$email_bodyCc = $_POST['name']." has sent this to you from www.BUZGate.org/8.0/".$state_abbrv_low."/".$page_name."\n		Please contact us at askbuz@buzgate.org if you have received this in error.		";				$email_bodyCc = $email_bodyCc.$eBodyQuestions2;		$headersCc = "From:askbuz@buzgate.org";			//PLACE VARIABLES IN CC MAIL FUNCTION		mail($toCc, $email_subjectCc, $email_bodyCc, $headersCc);			//Place variables in mail funciton		mail($to, $email_subject, $email_body, $headers);			// DISPLAY RESPONSE TO CORRECTLY FILLING OUT FORM		echo "Thank you and best wishes for success with your future endeavors.Dr. William R. OsgoodAuthor, 10-Step Venture Success Program";	}?>

[/center]

Link to comment
Share on other sites

here it is without code box which centered everything<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><META NAME="robots" CONTENT="noindex,nofollow"><link href="/8.0/styles/_e-learning.css" rel="stylesheet" type="text/css" /></head><body background="/images/background.jpg"><div id="container" align="center"><div id="header"><p class="tenTitle">Step 10 Summary </p></div><div id="main"> <p id="stepTitle"><br /> Feedback and Graduation</p><a name="result"></a><?php // NAME STEP, GIVE NUMBER OF QUESTIONS AND GIVE VALUE TO QUESTION VARIABLES SO ERROR CHECKING DOES NOT HAVE TO BE RECREATED FOR EVERY PAGE $stepNumber = 'Feedback'; $numQuestions = '9'; $questions = array(1 => '1. The self-assessment exercises helped me to:', '2. My business idea is to provide what product and/or service:', '3. I plan to sell what to who and why: ', '4. What are your management strengths and what skills, if any, will you seek help with:', '5. My business will succeed because:', '6. My operation will breakeven when and why:', '7. I plan to finance my business how:', '8. The three most useful external business assistance agencies for me are:', '9. Three of the near term business development action items I plan to do are:' ); /*$numQuestions2 = '1'; $numQuestions2 = array(1 => '10. I plan to launch my venture:'); // GIVE NUMBER OF RADIO BOX OPTIONS AND THEIR NAMES $numOptions = 5; $options = array(1 => '< 6-months', '> 6 months - 1 year', '> 1 - 2 years', '> 2 - 5 years', 'Never');*/ //ADD QEUSTIONS AND ANSWERS TO $EMAIL_BODY AND $EMAIL_BODYCC BELOW // IF FORM WAS SUBMITTED, MOVE ON TO NEXT STEP (ERROR CHECKING) if(isset($_POST['submit'])) { // CHECK FOR MISSING DATA (ERROR CHECKING) for ($i = 1; $i <= $numQuestions; $i++) { if (empty($_POST['data'.$i])) { $problem = TRUE; $dataSpan[$i] = '<span style="color:red; font-weight:bold;">'.$questions[$i].'</span>'; } else { $dataSpan[$i] = $question[$i]; } } /*for ($i = 1; $i <= $numQuestions2; $i++) { if (empty($_POST['radio'.$i])) { $problem = TRUE; $dataSpan2[$i] = '<span style="color:red; font-weight:bold;">'.$options[$i].'</span>'; } else { $dataSpan2[$i] = $options[$i]; } }*/ if (empty($_POST['email'])) { $problem = TRUE; $emailSpan = '<span style="color:red; font-weight:bold;">*Your email address</span>'; } else { $emailSpan = '*Your email address'; } if (!empty($_POST['emailCc']) && (empty($_POST['name']))) { $problem = TRUE; $nameSpan = '<span style="color:red; font-weight:bold;">Your Name</span>'; } else { $nameSpan = 'Your Name'; } // IF MISSING DATA, PREPARE TO DISPLAY FORM. IF NO MISSING DATA, MOVE ON TO NEXT STEP (THANK YOU, SEND EMAILS AND LINK TO NEXT FORM) if ($problem == TRUE) { $display = TRUE; } else { $display = FALSE; } } // IF THE FORM IS NOT BEING SUBMITTED (FIRST VISIT TO PAGE), SET THE // FORM DISPLAY VARIABLE TO TRUE AND DEFINE VALUES OF DATA#SPAN VARIABLES (QUESTIONS) else { $display = TRUE; for ($i = 1; $i <= $numQuestions; $i++) { $dataSpan[$i] = $questions[$i]; } /*for ($i = 1; $i <= $numQuestions2; $i++) { $dataSpan2[$i] = $options[$i]; }*/ $emailSpan = '*Your email address'; $nameSpan = 'Your Name'; } if ($problem == TRUE) { print '<div id="tenForm"><p><strong>Congratulations!</strong>You have completed the last step in the 10-Step Venture Success learning program. <p>Having participated fully, you should now...</p> <ul> <li>Have a strong sense of how to move with your business strategy,</li> <li>Know your strengths and what you need to do to further progress, and</li> <li>Understand that there is a broad network of people, programs and resources available to support you along the way!</li> </ul> <p>As a first step to building your future support network, please provide us with the following information. This information will kept in strict confidence <a href="http://www.buzgate.org/8.0/nh/about_privacy.html" target="_blank">view privacy policy</a> and permits us to:</p> <ol><li>Validate your training</li> <li>Mail your graduation certificate to you</li> <li>Reconnect with you in the future to learn of your progress</li></ol>'; $_POST['email'] = $_SESSION['email']; $_POST['emailCc'] = $_SESSION['emailCc']; $_POST['name'] = $_SESSION['name']; /*print '<br clear="all" /> <p>* Required fields are marked with an asterisk<br> *First Name<br /> <input type="text" size="40" maxlength="100" name="yourFname" class="required" value="' . $_POST['yourFname'] . '" /> </p><p> *Last Name<br /> <input type="text" size="40" maxlength="100" name="yourLname" class="required" value="' . $_POST['yourLname'] . '" /> </p><p> Title<br /> <input type="text" size="40" maxlength="100" name="yourTitle" class="required" value="' . $_POST['yourTitle'] . '" /> </p><p> Company Name<br /> <input type="text" size="40" maxlength="100" name="yourCname" class="required" value="' . $_POST['yourCname'] . '" /> </p><p> *Address 1<br /> <input type="text" size="40" maxlength="100" name="yourAddress1" class="required" value="' . $_POST['yourAddress1'] . '" /> </p><p> Address 2<br /> <input type="text" size="40" maxlength="100" name="yourAddress2" class="required" value="' . $_POST['yourAddress2'] . '" /> </p><p> *City<br /> <input type="text" size="40" maxlength="100" name="yourCity" class="required" value="' . $_POST['yourCity'] . '" /> </p><p> *State<br /> <input type="text" size="40" maxlength="100" name="yourState" class="required" value="' . $_POST['yourState'] . '" /> </p><p> *Zip/Postal Code<br /> <input type="text" size="40" maxlength="100" name="yourZip" class="required" value="' . $_POST['yourZip'] . '" /> </p><p> Telephone<br /> <input type="text" size="40" maxlength="100" name="yourPhone" class="required" value="' . $_POST['yourPhone'] . '" /> </p><p> *Your email address<br /> <input type="text" size="40" maxlength="100" name="yourFname" class="required" value="' . $_POST['yourFname'] . '" /> </p>*/ print'<p> *Briefly share comments below regarding each of the 10-Step Venture Success exercises:<br /> <form method="POST" name="contact_form" action="ten_steps_feedback2.php#result"> <table border="0" cellpadding="4" cellspacing="3" align="center">'; for ($i = 1; $i <= $numQuestions; $i++) { echo '<tr> <td align="left" valign="top" border="0"> <p>'.$dataSpan[$i].'</p> <textarea rows="5" cols="48" id="data'.$i.'" name="data'.$i.'">'.$_POST['data'.$i].'</textarea> </td> </tr>'; /*for ($i = 1; $i <= $numQuestions2; $i++) { echo '<tr> <td align="left" valign="top" border="0"> <p>'.$dataSpan2[$i].'</p>'; for ($j = 1; $j <= $numOptions; $j++) { $elemID = "radio" . $i . "_" . $j; $elemName = "radio" . $i; $chk = ""; if(isset($_POST[$elemName])) { if($_POST[$elemName] == ((string) $j)) { $chk = "CHECKED"; } } echo "<input type=\"radio\" id=\"$elemID\" name=\"$elemName\" $chk value=\"$j\">$options[$j]\n"; } print '</li></td> </tr>';*/ } print '</table> *Anti-Spam code Check here to receive copy of this form at the above email address Keep me informed with regular business assistance resource updates <table border="0" cellpadding="3" cellspacing="2" align="center"> <td class="submitCell" align="center"> <input type="reset" value="Clear" /> <input type="submit" name="submit" value="Submit" /><br /> <a href="'.$filePathState.'about_privacy.html" target="_blank"><span style="font-size:9px;">View our privacy policy</span></a> </td> </tr></table> </form>'; } // DEFINE VARIABLES FOR MAILING TO USER AND BUZGATE $to = 'askbuz@buzgate.org,'.$_POST['email']; $email_subject = "Step ".$stepNumber." in Buzgate's Ten Step Program"; for ($i = 1; $i <= $numQuestions; $i++) { $questions .= $questions[$i]."\n" /* .$options[$_POST['radio'.$i]]."\n"*/; $email_body = $email_body.$eBodyQuestions.$eBodyQuestions2; $headers = "From:".$_POST['email']; //PLACE VARIABLES IN MAIL FUNCTION mail($to, $email_subject, $email_body, $headers); // DEFINE VARIABLES FOR MAILING TO USER AND BUZGATE $toCc = $_POST['emailCc']; $email_subjectCc = "Step ".$stepNumber." in Buzgate's Ten Step Program from ".$_POST['name']; $email_bodyCc = $_POST['name']." has sent this to you from www.BUZGate.org/8.0/".$state_abbrv_low."/".$page_name."\n Please contact us at askbuz@buzgate.org if you have received this in error. "; $email_bodyCc = $email_bodyCc.$eBodyQuestions2; $headersCc = "From:askbuz@buzgate.org"; //PLACE VARIABLES IN CC MAIL FUNCTION mail($toCc, $email_subjectCc, $email_bodyCc, $headersCc); //Place variables in mail funciton mail($to, $email_subject, $email_body, $headers); // DISPLAY RESPONSE TO CORRECTLY FILLING OUT FORM echo "<p>Thank you and best wishes for success with your future endeavors.Dr. William R. OsgoodAuthor, 10-Step Venture Success Program</p>"; }?></div></div></body></html>

Link to comment
Share on other sites

Sounds like the forum is handling code boxes wrong, it looks like it output the tags for the browser to use instead of displaying the characters.It looks like you're only displaying the form if there was an error, if $problem is true.

Link to comment
Share on other sites

Sounds like the forum is handling code boxes wrong, it looks like it output the tags for the browser to use instead of displaying the characters.It looks like you're only displaying the form if there was an error, if $problem is true.
do i not need that or should it be false?
Link to comment
Share on other sites

It depends what you want the page to do, but unless you're doing something like redirecting it seems like you would always want it to show.
I do want it to show?
Link to comment
Share on other sites

Are you asking me what you want? I don't know what you want, you know what you want. Do you always want the form to show on the page or not? If so, then you can remove the if statement that checks whether or not to show it. If you don't always want it to show, then you need to change the logic that decides whether or not to show it so that it checks based on whatever you want to happen.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...