mhmdshaheen mhmdshaheen - 1 month ago 5x
PHP Question

var_dump $_GET return null or not worked in wordpress

i'm have a problem with GET request in wordpress
when i'm

$post_ide = $_GET['post-id'] ;


when i'm go to the linke i'm have this linke without GET post-id and var_dump return null

can anyone help me ??
thank you


Instead of the hyphen in the variable name use and

$post_id = $_GET['post_id'];
var_dump( $post_id );