Title: 404 returned from a form&#8217;s action = PHP_SELF
Last modified: August 18, 2016

---

# 404 returned from a form’s action = PHP_SELF

 *  [mladd](https://wordpress.org/support/users/mladd/)
 * (@mladd)
 * [21 years, 2 months ago](https://wordpress.org/support/topic/404-returned-from-a-forms-action-php_self/)
 * Hey all, I’ve been trying to figure out this problem and it’s killin’ me. My 
   WP instll itself has been fine. No problems with the site. However, I tried adding
   a Page, using a copy of the template’s index.php, removed the scripts to pull
   back the content and replaced it with the tag include(TEMPLATEPATH . ‘/new_event.
   php’); .
 * The form that I am building is working fine (a little sloppy, but I’m just trying
   to get it working now). When I hit submit, the page goes back to index.php, instead
   of my PHP script. I have tried setting the action on the form to be Submit_Event(
   my Page name), new_event.php (my included file) and others. Right now it is:
   
   action=”<?php echo $PHP_SELF;?>”
 * I really think I am just missing something, that may be more related to PHP errors,
   than WP errors.
 * OH, the file new_event.php that I am including works fine out side of WP. The
   address, if anyone would like to take a look is [http://choochooguide.com/submit-event/](http://choochooguide.com/submit-event/)
 * Any thoughts?
 * Thanks,
    Mike

Viewing 2 replies - 1 through 2 (of 2 total)

 *  1539
 * [21 years, 2 months ago](https://wordpress.org/support/topic/404-returned-from-a-forms-action-php_self/#post-171184)
 * Try: `action="http://choochooguide.com/submit-event"` instead of `<?php echo 
   $PHP_SELF; ?>`. Since you’re including a file, you might have to reference that
   instead.
 *  Thread Starter [mladd](https://wordpress.org/support/users/mladd/)
 * (@mladd)
 * [21 years, 2 months ago](https://wordpress.org/support/topic/404-returned-from-a-forms-action-php_self/#post-171280)
 * Sun-of-a-gun, it worked. I didn’t think of putting the full path in there. Just
   now getting back into HTML/PHP after only a brief into some time ago. It seems
   I forgot everything.
 * Thanks for your help, Mark!
 * -Mike

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘404 returned from a form’s action = PHP_SELF’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [mladd](https://wordpress.org/support/users/mladd/)
 * Last activity: [21 years, 2 months ago](https://wordpress.org/support/topic/404-returned-from-a-forms-action-php_self/#post-171280)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
