Is it possible to include a form in a wordpress page?

latinskyscraper

New Member
I have the following code in a php template called contact_us. I have created a new page which uses this template, but when you click submit it doesn't post back to the same page and display what the user entered in the form. Any ideas why this doesn't work?Thanks,\[code\]if ($_SERVER['REQUEST_METHOD'] == 'POST') {$name = $_POST["name"];$comments = $_POST["comments"];echo $name;echo $comments;} ?><form action="<?php echo $PHP_SELF;?>" method="post" >Name : <br/><input type="text" name="name" /><br/>Comment <br/><textarea name="comments" name="comments"></textarea><br/><br/><input name="submit" type="submit" id="submit" value="http://stackoverflow.com/questions/3666434/Send" /></form>\[/code\]
 
Back
Top