Pass value by URL

Asked

Viewed 27 times

1

Hello. I’m new to PHP and I have a question. I need that when my user access the link https://meusite.com/code.php?id=**01**&key=**12345** PHP read the values 01 and 12345 and consult within my SQL in the KEY table if there is an ID 01 and you have KEY 12345 registered in it. If I have it, I get the value 1 or if I don’t have it, I get 0

I know how to create a connection in SQL, how to check the value and return me 1 or 0. But I don’t know how to take the LINK value, and turn it into a variable to do this check. I guess I’ll have to take the link value, split his ID and KEY and then check both, though, I don’t know how to do that.

Can someone help me?

  • Your question seems to have some problems and your experience here in Stack Overflow may not be the best because of it. We want you to do well here and get what you want, but for that we need you to do your part. Here are some guidelines that will help you: Stack Overflow Survival Guide in English (short version). If the solution is very simple it is still possible for someone to do so in the comments.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.