I’m trying to use JS to direct a user to their profile page on login. I need to get the profile id in the url but it’s not working.
if(data == 'success'){
window.location = 'profile.php?id=<?= $user_id ?>';
} else {
$('#signin_errors').html(data);
}
Any advice?
If this is a file included in
<script src="blah.js"></script>change it to<script src="blah.php"></script>and stick this code inblah.php