Question

I am trying to read email value from address bar in my active.php page my address bar looks like this.

"mywebsite/foledr/?page_id=734?email=emailaddress"

now in my active.php page I write

$email = $_GET['email']; 

I don't know what I am doing wrong here, to assign emailaddress into $email. Please help.

Was it helpful?

Solution 2

The ? is the start of the query string, while & separates the key=value pairs.

You have "mywebsite/folder/?page_id=734?email=emailaddress"

Which should be "mywebsite/folder/?page_id=734&email=emailaddress" using a & inbetween the page_id=734 and email=emailaddress

OTHER TIPS

? starts the query string.

& is used to separate the key=value pairs in it

You only have a page_id key, its value is 734?email=emailaddress.

Don't use ? when you mean &.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top