Title: Nonce help needed
Last modified: August 21, 2016

---

# Nonce help needed

 *  Resolved [Gregg](https://wordpress.org/support/users/lorax/)
 * (@lorax)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/nonce-help-needed/)
 * I created a form that pulls data from a database. The fields fill in fine. I 
   want to protect the form by making sure the user is at least an Editor so I added:
 *     ```
       if(current_user_can('manage_options') && (strlen($_GET['PID']) <= 5)){
           $auth = 1;
       }
       else {
           header('Location: top of the site being protected');
           exit;
       }
       ```
   
 * So I included the WordPress blog header before the above code:
 *     ```
       define('WP_USE_THEMES', false);
           require_once( 'wp-blog-header.php' );
       ```
   
 * That worked fine but then when I submit the form after edits – I get an error:“
   Security check: referal does not match this site.” After reading a bit I learned
   this has to do with nonces. I’m not sure why/how to deal with it and can’t find
   a way to troubleshoot the issue. I’d appreciate if someone could point me in 
   the right direction.

Viewing 1 replies (of 1 total)

 *  Thread Starter [Gregg](https://wordpress.org/support/users/lorax/)
 * (@lorax)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/nonce-help-needed/#post-4715003)
 * I solved the problem. I was using a form created by Visual Form Builder which
   still had the VFB names including in the submit action “vfb-submit” which must
   be a hook for VFB processing. I set this back to a normal submit and it worked
   just fine.

Viewing 1 replies (of 1 total)

The topic ‘Nonce help needed’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [Gregg](https://wordpress.org/support/users/lorax/)
 * Last activity: [12 years, 1 month ago](https://wordpress.org/support/topic/nonce-help-needed/#post-4715003)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
