0

I have a landing page (landing.html)

A php file that processes the form data, registers user and makes a link for autologin (signup.php) and passes the autologin link to (thankyou.php). Inside thankyou.php that url is decoded and the user is redirected (autologinned)

I have installed a tracking script to (thankyou.php) so I can track when users have registered.

My problem is that the thankyou.php is not fully loaded (after form submission), and the tracker does not see the user visit the page. (the autologin works tho, the code is executed correctly)

How can i make a client visit that thankyou.php page so the tracking software can actually catch the visit?

Here's the thankyou.php

<script type="text/javascript">TRACKING SCRIPT
</script>

<?php

$url=$_GET['to'];
if(empty($url)){
    echo "No URL found";
} else {
    header("Location: ".$url);
}

?>

The tracker catches the visit only if i directly visit the (thankyou.php)

Meta Matt
  • 1
  • 1
  • https://stackoverflow.com/questions/8028957/how-to-fix-headers-already-sent-error-in-php – vee Jul 15 '22 at 19:12
  • i dont think thats regarding my question – Meta Matt Jul 15 '22 at 19:15
  • It is. Because you use `header('location: xxx')` after the output body and that should showing errors but you just did not display it. The redirect function like this will not work. If you read that link, they are already explained everything. – vee Jul 16 '22 at 03:44
  • nah man it all works now i just added refresh to the header – Meta Matt Jul 16 '22 at 21:03

0 Answers0