Title: PHP Get data
Last modified: August 24, 2016

---

# PHP Get data

 *  [laikmosh](https://wordpress.org/support/users/laikmosh/)
 * (@laikmosh)
 * [11 years ago](https://wordpress.org/support/topic/php-get-data/)
 * Hello again, i needed to use the data sent from a previous form with a shortcode,
   i went all around the web looking for a plugin to achieve this but i didnt find
   any, so i wrote this function:
 * function php_get( $atts ) {
    $php_decode = urldecode($_GET[$atts[‘name’]]); $
   php_decode); return $php_result; }
 * It worked fine, now when i use this shortcode [php_get name] i get the name from
   the url ?name=”someone”, maybe this function should be considered for this plugin,
   but now mi question is:
    how can i use that data inside a shortode loop? i tried
   with {php_get name} but it didnt work, i used the shortcode inside a custom field,
   when i call the field like [field php] it works but when i try to use it inside
   a shortoce like: [pass field=”php][loop type=”{FIELD}”] it doesnt work, is there
   anyway i could use this function inside a shortcode?
 * [https://wordpress.org/plugins/custom-content-shortcode/](https://wordpress.org/plugins/custom-content-shortcode/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Eliot Akira](https://wordpress.org/support/users/miyarakira/)
 * (@miyarakira)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/php-get-data/#post-5961538)
 * Hello,
 * To pass a value from a global variable, you can use the [pass] shortcode. For
   example..
 *     ```
       [pass global="_GET" field="post_type"]
         [loop type="{FIELD}"]
           ...
         [/loop]
       [/pass]
       ```
   
 * If you need multiple values:
 *     ```
       [pass global="_GET" fields="post_type, category"]
         [loop type="{POST_TYPE}" category="{CATEGORY}"]
           ...
         [/loop]
       [/pass]
       ```
   
 * For details, please see the reference under Settings -> Custom Content -> Other-
   > Pass.

Viewing 1 replies (of 1 total)

The topic ‘PHP Get data’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/custom-content-shortcode_766976.svg)
 * [Custom Content Shortcode](https://wordpress.org/plugins/custom-content-shortcode/)
 * [Support Threads](https://wordpress.org/support/plugin/custom-content-shortcode/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-content-shortcode/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-content-shortcode/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-content-shortcode/reviews/)

## Tags

 * [php get](https://wordpress.org/support/topic-tag/php-get/)

 * 1 reply
 * 2 participants
 * Last reply from: [Eliot Akira](https://wordpress.org/support/users/miyarakira/)
 * Last activity: [10 years, 11 months ago](https://wordpress.org/support/topic/php-get-data/#post-5961538)
 * Status: not resolved