mikeym Posted December 5, 2007 Share Posted December 5, 2007 Hi, I'm trying to make a series of pages that I want users to be able to select to make a comment, have a comment box open, type their comment and submit it to be shown their new comment on the same page. Is this possible using php and how do I go about organising it? I want to have my pages as html with <?php whatever ?> tags in them so that the basic page is kept as simple as possible. My first attempt will let me click on a new comment button which will open a box to add a comment (as long as you're logged in) - this is using a html parameter to tell it to show the box called from the link - but I have no idea how to then submit the form and open up the same page. The test page for this is very scrappy so I apologise but it can be found at:http://www.getoutofglasgow.com/test/index.htm Log on as "tester" with the password "test" to see how it's working so far. Quote Link to comment Share on other sites More sharing options...
fanfavorite Posted December 5, 2007 Share Posted December 5, 2007 This what you are talking about? <? if ($_POST['submit']) { echo $_POST[comment]; } else { ?> <form enctype="multipart/form-data" action="" method="post"> Comment:<textarea name="comment" cols="40" rows="10" style="overflow: auto"></textarea> <input type="submit" name="submit" value="Submit" /> </form> <? } ?> 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.