Howdy. I’d like to append some html to a file but I want it appended to a specific area of the file. For example, from the code below instead of creating a form with the new label and input field, I would like to append the label and input to a form in another file. Would I have to have a place holder in the form for each new label and input field. I have the idea I just can’t wrap my head around it.
<form action="<?php echo $_SERVER['PHP_SELF'];?>" method="post">
<label for="add_header_text_opt">Display Header Option</label>
<input type="checkbox" name="add_header_text_opt" value="Yes" />
<p><input type="submit" name="submit" value="Create Options" class="button" /></p>
</form>
<?php
if(!isset($_POST["submit"])) : ?>
<p>Submit form and your New element should show here</p>
<?php else : ?>
<form method="post" action="">
<?php if(isset($_POST["add_header_text_opt"]) && $_POST["add_header_text_opt"] = "Yes") : ?>
<label for="header_text">Enter text to display in header</label><br />
<input type="text" name="header_text" value="Enter Header Text" />
<?php endif; ?>
</form>
<?php endif; ?>
Thanks in advance.