Title: Button Shortcode with Post Vars
Last modified: January 4, 2023

---

# Button Shortcode with Post Vars

 *  Resolved [teracomp](https://wordpress.org/support/users/teracomp/)
 * (@teracomp)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/button-shortcode-with-post-vars/)
 * I need to create a button that links to an external site using a POST method 
   that passes userid, first_name, last_name, email, gender, and site_key (static
   text). Essentially, the <button>Click</button> will query the database, grab 
   user info, and redirect to a site that is looking for user identification data
   as shown above.
 * This seems like a shortcode function, but i’m new to Code Snippets.

Viewing 1 replies (of 1 total)

 *  Thread Starter [teracomp](https://wordpress.org/support/users/teracomp/)
 * (@teracomp)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/button-shortcode-with-post-vars/#post-16341939)
 * Disregard. Problem solved by creating a shortcode that produces a form with hidden
   variables.

Viewing 1 replies (of 1 total)

The topic ‘Button Shortcode with Post Vars’ is closed to new replies.

 * ![](https://ps.w.org/code-snippets/assets/icon.svg?rev=2148878)
 * [Code Snippets](https://wordpress.org/plugins/code-snippets/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/code-snippets/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/code-snippets/)
 * [Active Topics](https://wordpress.org/support/plugin/code-snippets/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/code-snippets/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/code-snippets/reviews/)

## Tags

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

 * 1 reply
 * 1 participant
 * Last reply from: [teracomp](https://wordpress.org/support/users/teracomp/)
 * Last activity: [3 years, 4 months ago](https://wordpress.org/support/topic/button-shortcode-with-post-vars/#post-16341939)
 * Status: resolved