I am attempting to pass variables through the URL using the header function as a way to redirect the page. But when the page is redirected it passes the actual variable names rather than the values associated with the variables. I am new to PHP and do not fully understand the syntax so any further explanation as to the proper way to do this would be much appreciated.
header('location: index.php?id=".$_POST[ac_id]."&err=".$login."');
In my case, many times header() not working properly. Instead of header function, I use window.location.href. You can try like this,