Convict Moody
Convict Moody

Reputation: 833

PHP how to use $_GET with char '&' in it?

Am trying to use $_GET with char '&' in it since the data in database are categorized using '&' between 2 words, but as storing $_GET in a variable it shows the first word like if:

Stack & Flow => $_GET=Stack

how to fix this without changing the whole database.

Or is there anyway to use 'Start With' in msqli query?

Upvotes: 0

Views: 57

Answers (1)

Forien
Forien

Reputation: 2763

Basics of HTTP request methods.

In GET method you use URL as medium and you pass data with syntax:

?variable=value&another_variable=value123

Where & is separator. You need to encode it.

urlencode('&')

Upvotes: 1

Related Questions