Hello I have a slider and at the end of the last slide i want it automaticaly directs visitors to another web page. I was able to get this to work but only if i use exact domain name which i cant use. My job wants me to use a php script that directs them to the web page. This php script works perfectly on my html put when i put the script inside javascript it breaks.
So my question is how do i place the php script inside the javascript below? My job only wants me to use the script because it tracks users and takes them to a specific register page.
BEFORE
this.element.addEventListener('ampstory:nonextpage', function () {
window.location.replace('https://www.tutorialrepublic.com/');
setTimeout('pageRedirect()', 5000);
Kk(a);
});
AFTER (WITH PHP CODE THAT BREAKS)
this.element.addEventListener('ampstory:nonextpage', function () {
window.location.replace('<?=ht_link('/main.php?a=user.registerfp_mobile&no_header=1&btn_bg_next=b70000')?>');
setTimeout('pageRedirect()', 5000);
Kk(a);
});