Title: php coding help
Last modified: August 18, 2016

---

# php coding help

 *  [lawtai](https://wordpress.org/support/users/lawtai/)
 * (@lawtai)
 * [21 years, 8 months ago](https://wordpress.org/support/topic/php-coding-help/)
 * I’m trying to fix up the polls plugin. Currently, since my site has permalinks
   on, when I try to vote when inside a post, I can’t because the submit button 
   for the poll calls index.php which won’t load due to the permalinks. I’ve looked
   in the php file, and found the places where it says “index.php” and i’ve changed
   those to “/” but that doesn’t seem to work either. It just brings my main page
   and the vote doens’t go through either. How can I make it so that after you click
   on the vote button, it’ll stay on the same page if you’re inside a post?

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

 *  [Mark Jaquith](https://wordpress.org/support/users/markjaquith/)
 * (@markjaquith)
 * [21 years, 8 months ago](https://wordpress.org/support/topic/php-coding-help/#post-100177)
 * You could make the poll go to <?php echo $_SERVER[‘PHP_SELF’]; ?>
 *  Thread Starter [lawtai](https://wordpress.org/support/users/lawtai/)
 * (@lawtai)
 * [21 years, 8 months ago](https://wordpress.org/support/topic/php-coding-help/#post-100195)
 * thanks, I was able to fix it with a variation of that code by using ‘.$PHP_SELF.’

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

The topic ‘php coding help’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [lawtai](https://wordpress.org/support/users/lawtai/)
 * Last activity: [21 years, 8 months ago](https://wordpress.org/support/topic/php-coding-help/#post-100195)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
