Skip to content

Instantly share code, notes, and snippets.

@bantic
Created February 23, 2019 18:34
Show Gist options
  • Save bantic/cef91cb918e1f863ffe3009de7083250 to your computer and use it in GitHub Desktop.
Save bantic/cef91cb918e1f863ffe3009de7083250 to your computer and use it in GitHub Desktop.
The PHP code is looking for a query parameter with the name "get_param" and the value "Hello world!".
I believe you can do this by appending the following to the URL of this PHP script: `?get_param=Hello world!`.
If that doesn't work you may need to URL-encode the "Hello world!" (because normally spaces aren't allowed in query params — but I think if you type
this into your browser location bar it will do the conversion for you automatically).
The URL-encoded form can be found by using the JavaScript `encodeURIComponent` function, like so: `encodeURIComponent('Hello world!')`.
The value is "Hello%20world!".
Good luck!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment