Problem with form – error 404
I’m trying to get a form up and running. I’m using a page template to create the page at http://www.gtcentralrotary.org/clubprojects . When you click submit the action goes to another Page template at http://www.gtcentralrotary.org/addtodb .
The addtodb page check to see if the form was submitted, if not prints out “please submit the form”, and if it was accessed after being sent from the form prints out “you submitted the form”. This is just to error check.
The problem is, if I try to access addtodb directly, I get the “please submit the form”. However, when I try to submit the form, I’m going to the same url but it gives me an Error 404. Is it because Im using slugs?
Before I had everything on the form page pointing to itself explicitly stating the URL, and was printing out the form if they hadn’t clicked to submit, and if they had clicked to submit, printing out “form was submitted” and had the same error 404.
Anyone know why this is happening? I’m almost positive it has something to do with WordPress, my PHP is very simple, if you need to have a look at it I’ll post it. Thanks for reading.
EDIT: I’ve tried specifying the page using ?page_id=21 and the same thing happens.
I’ve also tried using the same form, but pointing to a php file that’s with all the other php files in my theme folder, but when I try to call get_header() I get this message:
Fatal error: Call to undefined function: get_header() in /home/.excess/tonygeer/gtcentralrotary.org/wp-content/themes/rotary/addtodb.php on line 1
I’m guessing my php file doesnt have permission to access WordPress functions, but how can I fix this?
- The topic ‘Problem with form – error 404’ is closed to new replies.