0

First things first. I´m no PHP pro, but my boss wants me to do this, so if I made a major mistake, don´t facepalm too hard :)

So I have this custom built form on this site: http://meilenstein-online.com/

But I can´t test the form, because when I hit submit without filling anything in, it redirects me to the first post, which I then deleted, and now the site is empty after submitting.

When I fill out the form and hit submit, I get a 404.

What I´ve done and tried:

  • Homepage is the page you see (which should prevent the redirect)
  • I didn´t use "name" in the form
  • action is <?php the_permalink(); ?>
  • used "#" in form action (results in an empty page)
  • usedt "" in form action (results in an empty page)

You can find the form here: http://codepad.org/VIAO9RvD

Please not that I used a tutorial to build the form, since my PHP-Knowledge isn´t good enough, to build a form from scratch all by myself. Unfortunately I can´t post the link to the tutorial, but you see the code in the link above.

Thanks in advance!

1 Answer 1

0

input name attribute value name is reserved by WordPress, this is the problem i have found after visiting and testing your form, simply replace name="name" with name="fullName" etc.

<input type="text" name="name" placeholder="Name*" value="<?php echo esc_attr($_POST['name']); ?>" />

to

<input type="text" name="fullName" placeholder="Name*" value="<?php echo esc_attr($_POST['fullName']); ?>" />
1
  • I was sure I changed that already, but it seems to have sneaked back in >.> After looking at the code for too long, I guess I was just blind to it. Thanks for your answer.
    – Jannik Ruf
    Commented Sep 10, 2013 at 10:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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