mhmdshaheen mhmdshaheen - 1 year ago 134
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

Answer Source

Instead of the hyphen in the variable name use and

$post_id = $_GET['post_id'];
var_dump( $post_id );
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download