Title: Adding an existing script into a wordpress plugin
Last modified: August 22, 2016

---

# Adding an existing script into a wordpress plugin

 *  [2paulm](https://wordpress.org/support/users/2paulm/)
 * (@2paulm)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/adding-an-existing-script-into-a-wordpress-plugin/)
 * Hello all
 * I am trying to add a PHP script I have into a plugin.
 * the problem is it uses variables in the URL
 * for example if I include my page using a shortcode it needs to receive variables
   from url like
 * [http://sitename.com/pagename?contact=yes](http://sitename.com/pagename?contact=yes)
 * the plugin would then need to grab the variable
 * something like
 * `$contact=$_POST["contact"];`
 * can this work in wordpress?
 * I have been told that wordpress blocks url variables
 * what would be the best way to pass these variables to my plugin?
 * If there is a simpler way to pass these variables please include an example
 * Thanks for your thoughts and advise on this
 * Paul

The topic ‘Adding an existing script into a wordpress plugin’ is closed to new replies.

## Tags

 * [post](https://wordpress.org/support/topic-tag/post/)
 * [url](https://wordpress.org/support/topic-tag/url/)
 * [variables](https://wordpress.org/support/topic-tag/variables/)

 * 0 replies
 * 1 participant
 * Last reply from: [2paulm](https://wordpress.org/support/users/2paulm/)
 * Last activity: [11 years, 4 months ago](https://wordpress.org/support/topic/adding-an-existing-script-into-a-wordpress-plugin/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
