Skip to content

Instantly share code, notes, and snippets.

@ramzesimus
Created December 2, 2012 18:37
Show Gist options
  • Select an option

  • Save ramzesimus/4190361 to your computer and use it in GitHub Desktop.

Select an option

Save ramzesimus/4190361 to your computer and use it in GitHub Desktop.
PHP: Get Post ID
if( isset( $_GET['post'] ) ) $post_id = $_GET['post'];
elseif( isset( $_POST['post_ID'] ) ) $post_id = $_POST['post_ID'];
if( !isset( $post_id ) ) return;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment