[SOLVED] F7[v2] How to pass query value to web server?

path: ‘/news’,
url: ‘/web/news.php’,

when we visit url: www.domain.com/news?id=5
we can use js:


get the query value:5.

but php can not get the value,how can I get the query id?

Hi @woxiangfy,

Are questioning that how to get query parameter value in php?

If so, then you are in wrong forum.

when I visit: bhlc.allPatient?id=5

F7 just visit:bhlc.allPatient

I want request URL with ?id=5,so I can use php get the query value。

You can get the parameters of your URL through PHP with the following class: http_get ().


<? php

$ response = http_get ("http://www.example.com/", $ info);

var_dump ($ info);


More details on:


Hope this helps. :smiley: Happy New Year.

Maybe you above don’t understand what I mean. I modified the source code to achieve my needs(add in red box)

This may explain what I need.Thank you :grinning:

PHP can not get values, because Framework7 sent only “/web/news.php” without any GET variables.

I cat’n find a solution too.

YES! So I wish the author add one set to enable this Function, that I don’t need to modify the original code.

You can try to use Async route in v2 and add query parameters depending on requested route http://framework7.io/docs/routes.html#async-route

thank you! It works,my code is

1 Like

i am new to this form. i know this issue has been closed but i think i have a better solution to pass query values to a webserver.

this is how i solved it:
the link is:
the route is:
path: ‘/blog/:date’,
templateUrl: ‘./pages/blog.php?date={{this.$route.params.date}}’,

and print_r($_GET) in blog.php prints out:
Array ( [date] => 11-2-2018 )

is this what you meant?

1 Like