Using a custom defined variable in php header -
i building log in scheme when user logs in i'm using php header function , doesn't work 404 error saying
the requested url /account/_paw/sos/login/$url not found on server.
my code follows...
else { $_session['usr_bnmp_core_personal_identifier'] = $login; header('location: $url'); exit(); } in config.do.php define url as
//defined url without trailing slash $url = 'https://myaccount.mysitename.com'; any help appreciated
it's quote issue. variable $url not interpolated when in single quotes. changing double quotes solves problem.
change header('location: $url'); header("location: $url");.
php
No comments:
Post a Comment