phpsane Posted December 3, 2018 Share Posted December 3, 2018 Folks, What is wrong with the block text with the label "Description" ? All html after or below it in the file shows-up inside the block-text box when you check the page in the browser! <form name "link_submission_form" method = "post" action="" enctype = "multipart/form-data"> <div class="form-group"> <p align="left"><label>Url:</label> <select> <option value="<?php echo "$primary_domain";?>"><?php echo "$primary_domain";?></option> </select> <input type="url" placeholder="<?php echo '/directory/page.html';?>" name="primary_website_url" required [A-Za-z0-9] autocorrect=off value="<?php if(isset($_POST['primary_website_url'])) { echo htmlentities($_POST['primary_website_url']); }?>"> <label>; Anchor Text:</label> <input type="text" placeholder="Enter Link Text" name="anchor_text" required [A-Za-z0-9] autocorrect=off value="<?php if(isset($_POST['anchor_text'])) { echo htmlentities($_POST['anchor_text']); }?>"> </p> </div> <div class="form-group"> <p align="left"><label>Page Title:</label> <input type="text" placeholder="Enter Page Title" name="page_title" required [A-Za-z0-9] autocorrect=off value="<?php if(isset($_POST['page_title'])) { echo htmlentities($_POST['page_title']); }?>"> </p> </div> <div class="form-group"> <p align="left"><label>Page Description:</label> <textarea rows="10" cols="100" placeholder="Page Description" name="page description" required [A-Za-z0-9] autocorrect=off value="<?php if(isset($_POST['page_description'])) { echo htmlentities($_POST['page_description']); }?>"> </p> </div> <div class="form-group"> <p align="left"><label>Primary Website Email (To receive Visitor Entry Alerts):</label> <input type="text" placeholder="Email to receive Visitor Entry Notice" name="primary_website_email_for_visitor_entry_notice" required [A-Za-z0-9] autocorrect=off value="<?php if(isset($_POST['primary_website_email_for_visitor_entry_notice'])) { echo htmlentities($_POST['primary_website_email_for_visitor_entry_notice']); }?>"> </p> </div> <div class="form-group"> <p align="left"><label>Repeat Primary Website Email (To receive Visitor Entry Alerts):</label> <input type="text" placeholder="Repeat Email to receive Visitor Entry Notice" name="primary_website_email_confirmation_for_visitor_entry_notice" required [A-Za-z0-9] autocorrect=off value="<?php if(isset($_POST['primary_website_email_confirmation_for_visitor_entry_notice'])) { echo htmlentities($_POST['primary_website_email_confirmation_for_visitor_entry_notice']); }?>"> </p> </div> <div class="form-group"> <p align="left"><label>Primary Website Email (To receive Visitor Exit Alerts):</label> <input type="text" placeholder="Email to receive Visitor Exit notice" name="primary_website_email_for_visitor_exit_notice" required [A-Za-z0-9] autocorrect=off value="<?php if(isset($_POST['primary_website_email_for_visitor_exit_notice'])) { echo htmlentities($_POST['primary_website_email_for_visitor_exit_notice']); }?>"> </p> </div> <div class="form-group"> <p align="left"><label>Repeat Primary Website Email (To receive Visitor Exit Alerts):</label> <input type="text" placeholder="Repeat Email to receive Visitor Exit notice" name="primary_website_email_confirmation_for_visitor_exit_notice" required [A-Za-z0-9] autocorrect=off value="<?php if(isset($_POST['primary_website_email_confirmation_for_visitor_exit_notice'])) { echo htmlentities($_POST['primary_website_email_confirmation_for_visitor_exit_notice']); }?>"> </p> </div> <div class="form-group"> <p align="left"><label>Agree To Our Terms & Conditions ? :</label> <input type="radio" name="fb_tos_agreement_reply" value="Yes" <?php if(isset($_POST['fb_tos_agreement_reply'])) { echo 'checked'; }?> required>Yes <input type="radio" name="fb_tos_agreement_reply" value="No" <?php if(isset($_POST['fb_tos_agreement_reply'])) { echo 'checked'; }?> required>No </p> </div> <p align="left"><input type="submit" class="btn btn-default" name="submit" value="Submit"></p> <p align="left"><input type="reset" class="btn btn-default" name="reset" value="Reset"></p> </form> Notice each input field's requirement. Have I got any wrong ? Example: <input type="text" placeholder="Enter Link Text" name="anchor_text" required [A-Za-z0-9] autocorrect=off value="<?php if(isset($_POST['anchor_text'])) { echo htmlentities($_POST['anchor_text']); }?>"> Quote Link to comment Share on other sites More sharing options...
Barand Posted December 3, 2018 Share Posted December 3, 2018 (edited) Text areas do not have a value attribute. EG <textarea rows="10" cols="100" name="page_description" >Text area content goes here</textarea> The text content goes between the <textarea> and </textarea> tags. As you don't have the closing </textarea> it assumes everything following is still part of the text content. Edited December 3, 2018 by Barand 1 1 Quote Link to comment Share on other sites More sharing options...
phpsane Posted December 3, 2018 Author Share Posted December 3, 2018 35 minutes ago, Barand said: Text areas do not have a value attribute. EG <textarea rows="10" cols="100" name="page_description" >Text area content goes here</textarea> The text content goes between the <textarea> and </textarea> tags. As you don't have the closing </textarea> it assumes everything following is still part of the text content. Oops! Thanks! I need blocktext box input to remain should user get php echoing error due to any incorrect inputs in any fields of the form. And so, I coded it like this now: <div class="form-group"> <p align="left"><label>Page Description:</label> <textarea rows="10" cols="100" name="page description" required [A-Za-z0-9] autocorrect=off><?php if(isset($_POST['page_description'])) { echo htmlentities($_POST['page_description']); }?> </textarea> </p> </div> What do you think now ? Any good ? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.