Skip to content

Tag: url

Fetching url query parameters inside php case

I have below index.php file which will handle all routes: And below file is home.php: In case of no query strings, the above setup works fine. But how will I include the condition in which user hits 127.0.0.1/home?1234. In this case, any case statement will become invalid and it will return wrong. How would I…

How can I get post id from url?

blog.php URL: I want to get post_id from url. But I don’t know how? I will be glad if you can help me. read.php Answer I can advice next solution: