Howdy! I’m missing something very simple in this code and I can’t see it. Can someone lend a quick pair of eyes. I know it’s something basic but my coffee isn’t working this morning. Thanks in advance.
<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="search" value="Create Options" class="button" /></p>
</form>
<?php
if(isset($_POST["submit"])) : ?>
<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 else : ?>
<p>Submit form and your New element should show here</p>
<?php endif; ?>
Thanks guido2004. With you asking that question I looked at my form again and the submit button had the wrong name in the name element. How frustrating!
Thanks again