Hi all -- I'm new to this stuff but learning my way.
I'm using a page driven by WordPress, and users will be directed to the page with a 32-digit ID appended to the URL.
Example:
http://www.MYURL.com/pageslug&ID=56gqenwe2889kjndfkv8nszif8jjfy6a/
Does anyone know of a plugin that would help me capture that 32-digit ID? Any ideas? Thanks.
Anything in the URL strung together with ? and & is a query string (set of query parameters), you can capture that in PHP using..
<?php
if( isset( $_GET['ID'] ) ) {
echo $_GET['ID']; // Print's the value for testing
// Or store in var example
$my_var = $_GET['ID'];
}
?>
or
<?php
if( isset( $_REQUEST['ID'] ) ) {
echo $_REQUEST['ID']; // Print's the value for testing
// Or store in var example
$my_var = $_REQUEST['ID'];
}
?>
http://php.net/manual/en/reserved.variables.get.php
http://php.net/manual/en/reserved.variables.request.php
Thanks so much -- will check it out.