Skip to content
Advertisement

Tag: url

GET URL parameter in PHP

I’m trying to pass a URL as a url parameter in php but when I try to get this parameter I get nothing I’m using the following url form: I’m trying to get it through: But nothing returned. What is the problem? Answer $_GET is not a function or language construct—it’s just a variable (an array). Try: In particular, it’s

How to redirect subdomain to main domain maintaining the same URL?

My main domain(www.mysite.com) is pointing to a folder in my server (/home/user_name/htdocs/mysite.com). I have recently created a subdomain(m.mysite.com) through my hosting account. But it is pointing it to a new folder (/home/user_name/htdocs/m.mysite.com) in my server. I am not able to edit the path to which this new subdomain points to. All my files are hosted in my main folder path.

Passing arrays as url parameter

What is the best way that I can pass an array as a url parameter? I was thinking if this is possible: or how about this: Ive read examples, but I find it messy: Answer There is a very simple solution: http_build_query(). It takes your query parameters as an associative array: will return http_build_query() handles all the necessary escaping for

Advertisement