Title: Pass Variables
Last modified: May 23, 2017

---

# Pass Variables

 *  Resolved [slevine42](https://wordpress.org/support/users/slevine42/)
 * (@slevine42)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/pass-variables/)
 * Is it possible to pass a variable with a button?
 * I have a button on a page with a user profile. When you press the button I made
   it takes you to a contact form. I’d like to pass info from the profile to the
   contact form.
 * So is there a way to assign info to a variable and then pass this with the button
   click to the new url?
 * Many thanks.
 * Scott

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

 *  Plugin Author [Bas Schuiling](https://wordpress.org/support/users/basszje/)
 * (@basszje)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/pass-variables/#post-9163653)
 * You can add variables to the button click, but you have to get that data and 
   read it to the form somehow by yourself.
 * Via PHP:
    `<?php echo do_shortcode('[maxbutton id=1 url=http://example.com]');?
   >`
 * If you are not familiar with PHP, there is no real way.
 * It doesn’t sound logical though since you can pull the user data of the logged
   in users quite easy via WordPress functions.
    -  This reply was modified 8 years, 11 months ago by [Bas Schuiling](https://wordpress.org/support/users/basszje/).
 *  Plugin Author [maxfoundry](https://wordpress.org/support/users/maxfoundry/)
 * (@maxfoundry)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/pass-variables/#post-9229799)
 * Can you mark this resolved [@slevine42](https://wordpress.org/support/users/slevine42/)?
 * Thanks,
 * Bob
 *  Thread Starter [slevine42](https://wordpress.org/support/users/slevine42/)
 * (@slevine42)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/pass-variables/#post-9230860)
 * Please mark it as resolved.
 * Many thanks.
 *  Plugin Author [maxfoundry](https://wordpress.org/support/users/maxfoundry/)
 * (@maxfoundry)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/pass-variables/#post-9231075)
 * You bet.

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

The topic ‘Pass Variables’ is closed to new replies.

 * ![](https://ps.w.org/maxbuttons/assets/icon-128x128.png?rev=1378636)
 * [MaxButtons - Create buttons](https://wordpress.org/plugins/maxbuttons/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/maxbuttons/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/maxbuttons/)
 * [Active Topics](https://wordpress.org/support/plugin/maxbuttons/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/maxbuttons/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/maxbuttons/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [maxfoundry](https://wordpress.org/support/users/maxfoundry/)
 * Last activity: [8 years, 11 months ago](https://wordpress.org/support/topic/pass-variables/#post-9231075)
 * Status: resolved