Title: Avoid direct url
Last modified: July 11, 2017

---

# Avoid direct url

 *  Resolved [evejuan](https://wordpress.org/support/users/evejuan/)
 * (@evejuan)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/avoid-direct-url/)
 * Hi,
 * In our webpage we let guest fill polls, but in the previously page we have a 
   form with name and email. When submit the form, appears the poll, but if I put
   the url directly appears too.
 * How can we avoid the direct url?
 * Thank you in advance,

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

 *  Plugin Author [Lester Chan](https://wordpress.org/support/users/gamerz/)
 * (@gamerz)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/avoid-direct-url/#post-9308195)
 * Sorry that is not possible since the polls is embedded in your sidebar/post in
   your theme. So when there is a sidebar or the post, the poll will appear.
 *  Thread Starter [evejuan](https://wordpress.org/support/users/evejuan/)
 * (@evejuan)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/avoid-direct-url/#post-9311189)
 * Thank you Lester for your fast reply.
 * Ok, but can we modify any php file from the plugin to check the POST variables
   in the previous form or the previous page to activate the poll?
 * Example:
 *     ```
       if ($_POST["email"]) {
           activatepoll();
       } else {
           echo "You must fill the previous form";
       }
       ```
   
 * or
 *     ```
       if ($_SERVER['HTTP_REFERER']=="http://www.mydomain.com/form.php") {
           activatepoll();
       } else {
           echo "You must fill the previous form";
       }
       ```
   
 * Best regards 🙂
 *  Plugin Author [Lester Chan](https://wordpress.org/support/users/gamerz/)
 * (@gamerz)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/avoid-direct-url/#post-9311401)
 * I don’t think that will work because it uses AJAX to vote.

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

The topic ‘Avoid direct url’ is closed to new replies.

 * ![](https://ps.w.org/wp-polls/assets/icon.svg?rev=977996)
 * [WP-Polls](https://wordpress.org/plugins/wp-polls/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-polls/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-polls/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-polls/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-polls/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-polls/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Lester Chan](https://wordpress.org/support/users/gamerz/)
 * Last activity: [8 years, 8 months ago](https://wordpress.org/support/topic/avoid-direct-url/#post-9311401)
 * Status: resolved