0

http://www.local.com/?code=xxxxxxxxxxxxxxxxxxxxxxxx

I want to retrieve and save code parameter in PHP

1

2 Answers 2

6

you can try this

$code = $_GET['code'];

now $code will have value of code which is in url

Sign up to request clarification or add additional context in comments.

1 Comment

welcome, one more thing you can use $_REQUEST instead of $_GET
1

Maybe this will work:

<?php $code = $_GET['code']; ?>

$code should now have the code in the URL.

For more information on $_GET, see this page.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.