Accessing $_POST in a WordPress Page
-
I’ve been using WP 2.0.1 and Exec-PHP to try and create a Contact form on a Static WP Page that is accessed through a permalink. However, I can’t seem to pass the $_POST variable back to it.
I’m trying as simple code as possible to get this to work, and it’s still coming up with a 404 when I try to submit. Here’s my code:
<?php if ($_POST[email]=="") { ?>
<form action="/contact" method="post">
<input type="text" name="author" size="22" />
<input type="text" name="email" size="22" />
<textarea name="comment" cols="100%" rows="10"></textarea>
<input name="submit" type="submit" value="Submit" />
</form>
<?php } else {
print_r($_POST);
}I tried looking around, and found a few things, but it seems as though people have generally had success with this kind of thing. Any suggestions?
- The topic ‘Accessing $_POST in a WordPress Page’ is closed to new replies.