# Get Attributes from URI

**URL:** <https://discourse.slimframework.com/t/get-attributes-from-uri/1392>\
**Category:** Questions\
**Created:** [April 15, 2017, 9:27am UTC](https://discourse.slimframework.com/t/get-attributes-from-uri/1392 "2017-04-15T09:27:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Qasmi](https://avatars.discourse-cdn.com/v4/letter/q/e9c0ed/32.png) [@Qasmi](https://discourse.slimframework.com/u/Qasmi)\
**Post date:** [April 15, 2017, 9:27am UTC](https://discourse.slimframework.com/t/get-attributes-from-uri/1392/1 "2017-04-15T09:27:14Z")

</div>

how to get the Attributes form the URI requested by client side ,  
URI :  
[http://localhost:8080/serverEndModule1/v1/varify?i](http://localhost:8080/serverEndModule1/v1/varify?i) **d=OQ==&code=1e212ffc375e52a9c6e7debe8adcc179**  
I want to get two attributes into server end how can get two attributes from the URI  
I try the following code ( get Route)

_$app-\>get(’/varify/:id/:code’, function ($id,$code) use ($app) {_  
\_ //verifyRequiredParams(array(‘id’, ‘code’));\_  
_// $id = $app-\>request-\>post(‘id’);_  
_// $code = $app-\>request-\>post(‘code’);_  
\_ \_  
\_ $db = new DbOperation();\_  
\_ $response = array();\_  
\_ $res= $db-\>userVarify($id, $code);\_  
\_ if($res==0)\_  
\_ {\_  
\_ $response[“error”] = false;\_  
\_ $response[“message”] = " Your Account is Now Activated ";\_  
\_ echoResponse(201, $response);\_  
\_ }else if ($res==1) {\_  
\_ \_  
\_ $response[“error”] = true;\_  
\_ $response[“message”] = " Your Account is Now Activated ";\_  
\_ echoResponse(201, $response);\_  
\_ \_  
\_ } else if ($res==2) {\_  
\_ $response[“error”] = true;\_  
\_ $response[“message”] = " No Account Found ";\_  
\_ echoResponse(201, $response);\_  
\_ \_  
\_ } Please help\_

---

<div class="post-metadata">

**Author:** ![tflight](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/tflight/32/1205_2.png) [@tflight](https://discourse.slimframework.com/u/tflight)\
**Post date:** [April 15, 2017, 11:41am UTC](https://discourse.slimframework.com/t/get-attributes-from-uri/1392/2 "2017-04-15T11:41:52Z")

</div>

Are you using Slim version 2?

---

<div class="post-metadata">

**Author:** ![Qasmi](https://avatars.discourse-cdn.com/v4/letter/q/e9c0ed/32.png) [@Qasmi](https://discourse.slimframework.com/u/Qasmi)\
**Post date:** [April 15, 2017, 1:41pm UTC](https://discourse.slimframework.com/t/get-attributes-from-uri/1392/3 "2017-04-15T13:41:13Z")

</div>

Thank for replay , Yes I’m using slim version 2
