• Resolved aaron44126

    (@aaron44126)


    Hi. I’m working on moving one of the pages I run to WordPress, so that it will be easier to maintain once I pass off my job to a new webmaster!

    Most everything, I have been able to figure out so far. However, here’s one thing I ran into today that I have been unable to get around.

    I have written a plug-in that, with a shortcode, produces a small form that visitors can fill out to be added to a newsletter mailing list. After the form is filled out, the same page should be loaded and the PHP code will notice that the form has been POSTed and take the appropriate action, instead of printing the form again.

    Here’s a test page:
    [snipped]
    (Don’t worry, I’m not capturing e-mail addresses right now, so you can test without either messing anything up or adding any e-mail address to some spam list!)

    You’ll notice that, when the form is submitted, WordPress just gives me the “Page not found” error, even though the URL is the same. It seems that WordPress has noticed that someone tried to POST a form and decided that meant that the request was invalid. I was wondering if anyone here could suggest a way around this. I want the same page to be loaded again and my plug-in will handle processing the form.

    Thanks!

Viewing 1 replies (of 1 total)
  • Thread Starter aaron44126

    (@aaron44126)

    Alright, nevermind! I found the answer elsewhere on these forums. Hard problem to Google for though.

    Anyway, the solution is to NOT have a form element named “name”, that’s what causes this error.

Viewing 1 replies (of 1 total)
  • The topic ‘Writing a plug-in –> submit form –> page not found!’ is closed to new replies.