Title: Where $PHP_SELF comes from
Last modified: August 18, 2016

---

# Where $PHP_SELF comes from

 *  [altrugon](https://wordpress.org/support/users/altrugon/)
 * (@altrugon)
 * [19 years, 1 month ago](https://wordpress.org/support/topic/where-php_self-comes-from/)
 * Hello everybody,
 * Can anybody tell me where the value of $PHP_SELF comes from. Most of the times
   is blank and is causing me troubles in some of my pages. I’m using the next form
   in my side bar
 *     ```
       <form action="<?php echo $PHP_SELF ?>" method="get">
       ...
       </form>
       ```
   
 * To displays the categories using the function wp_dropdown_categories(), but only
   works in the main template. When I’m under another template (ie: single post,
   search results) the form doesn’t work.
 * Should I change the value of the action parameter to my main page?
 * Thanks a lot.

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

 *  [whooami](https://wordpress.org/support/users/whooami/)
 * (@whooami)
 * [19 years, 1 month ago](https://wordpress.org/support/topic/where-php_self-comes-from/#post-538253)
 * second link off google:
 * [http://blog.taragana.com/index.php/archive/understanding-_serverphp_self-php_self-_serverrequest_uri-and-_serverscript_name-in-php-and-when-to-use-what/](http://blog.taragana.com/index.php/archive/understanding-_serverphp_self-php_self-_serverrequest_uri-and-_serverscript_name-in-php-and-when-to-use-what/)
 *  Thread Starter [altrugon](https://wordpress.org/support/users/altrugon/)
 * (@altrugon)
 * [19 years ago](https://wordpress.org/support/topic/where-php_self-comes-from/#post-538522)
 * hehe 😛 I guess I worked to much that night. I can’t beleive I even didn’t try
   to google that.
 * Thanks anyway.

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

The topic ‘Where $PHP_SELF comes from’ is closed to new replies.

## Tags

 * [wp_dropdown_categories](https://wordpress.org/support/topic-tag/wp_dropdown_categories/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [altrugon](https://wordpress.org/support/users/altrugon/)
 * Last activity: [19 years ago](https://wordpress.org/support/topic/where-php_self-comes-from/#post-538522)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
