Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am creating a contact form page. Perhaps I am doing it wrong? I have something like

<?php
// even when I remove this validation block it fails
if (isset($_POST['name'])) {
    // do validation ... 
}

get_header(); 
?>
...
<form id="frmContact" action="<?php the_permalink() ?>" method="post">
    ... 
</form>
... 

I used the same logic in another page and it works ... the URL is correct and if I refresh the page, it works. It just gives 404 on post back

share|improve this question
add comment

2 Answers

up vote 0 down vote accepted

Maybe try clearing out the action attribute: action=""

share|improve this answer
    
It still gives 404 ... –  JM at Work Jun 23 '11 at 1:57
    
What values are you posting? It's probably best to namespace them ... especially if you are processing a form so late in game –  mfields Jun 23 '11 at 2:04
    
yes ... I remembered ... I think its the "name" key –  JM at Work Jun 23 '11 at 2:15
    
That would do it :) –  mfields Jun 23 '11 at 2:25
add comment

Wordpress has something triggered from posting a field with name="name" tried to change it to name="clientname" for example.

share|improve this answer
    
How is that an answer? –  kaiser Jan 23 '13 at 23:53
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.