lisovaccaro
lisovaccaro

Reputation: 33956

Check with PHP if sending a variable through URL even if it's blank

I want to check with PHP if ?u= exists, even if it hasn't any value assigned.

E.G: http://website.com/?u= should return true.

How can I do it?

Upvotes: 0

Views: 69

Answers (1)

Jimmy Sawczuk
Jimmy Sawczuk

Reputation: 13614

You can check the return value of isset($_GET['u']).

Upvotes: 5

Related Questions