Output Buffer a form
Posted: Sun May 10, 2009 4:20 am
I am trying to use output buffer to output the result of a form into a html file. However, the html file does not hold all the results. The input fields are fine, but the drop down boxes, radio buttons, checkboxes, and textareas do not hold the results. Am I doing it wrong? Any fix or work around?
Thank you for taking the time to check it out.
Thank you for taking the time to check it out.
Code: Select all
<?php
ob_start();
?>
.
.
.
<fieldset>
<legend>Position (preference may be given to counselors who can stay for longer)</legend>
<table width="100%">
<tr>
<td width="50%"> <label>Position applying for</label> <br>
<input type="radio" name="position" value="Counselor (entering 12th Grade and higher">
<label>Counselor (entering 12th Grade and higher</label> <br>
<input type="radio" name="position" value="Junior Counselor (entering 11th Grade)">
<label>Junior Counselor (entering 11th Grade)</label> <br>
<input type="radio" name="position" value="WSI">
<label> WSI</label> <br>
<label> <input type="radio" name="position" value="Assistant Swimming Instructor">
Assistant Swimming Instructor</label> </td>
<td class="left-line-box">
<label>Weeks applying for:</label> <br>
<input name="weeks[]" type="checkbox" id="weeks" value="June 22 - 26"> <label>June 22 - 26</label> <br>
<input name="weeks[]" type="checkbox" id="weeks" value="June 29 - July 3">
<label> June 29 - July 3</label> <br>
<input name="weeks[]" type="checkbox" id="weeks" value="July 6 - 10">
<label>July 6 - 10</label> <br>
<input name="weeks[]" type="checkbox" id="weeks" value="July 13 - 17 ">
<label>July 13 - 17</label> <br>
<input name="weeks[]" type="checkbox" id="weeks" value="July 20 - 24">
<label>July 20 - 24 </label><br>
<input name="weeks[]" type="checkbox" id="weeks" value="July 27 - 31 "> <label>July 27 - 31</p></label>
</td>
</tr>
</table>
</fieldset>
<br>
<fieldset>
<legend>Experience …</legend>
<label>Experience: (list all experience with children i.e. counselor
positions, babysitting, Pirchei groups, siblings)</label>
<br>
<textarea name="experience" value="<?php echo $experience; ?>" cols="60" rows="3" id="experience"></textarea>
<br>
<label>Please list your interests, talent and hobbies: (i.e. tutoring,
sports, swimming, choir, art, etc…)</label>
<br>
<textarea name="interest" value="<?php echo $interest; ?>" cols="60" rows="3" id="interest"></textarea>
<br>
<label>Please explain why you would like to be a counselor:</label>
<br>
<textarea name="why" value="<?php echo $why; ?>" cols="60" rows="3" id="why"></textarea>
<br>
<label>What do you feel are your greatest assets as a counselor:</label>
<br>
<textarea name="asset" value="<?php echo $asset; ?>" cols="60" rows="3" id="asset"></textarea>
<br>
<label>Please explain how you would handle the following hypothetical
incident - two boys start to argue about a call in the game and one
storms off the field and starts to walk off:</label>
<br>
<textarea name="hypothethical" value="<?php echo $hypo; ?>" cols="60" rows="3" id="hypothetical"></textarea><br>
</fieldset>
.
.
.
<?php
$buffer = ob_get_flush();
ob_end_flush();
file_put_contents($appfile, $buffer);
?>