skip to Main Content

How do I redirect users after they have either registered or login from either login page or register page to the main page

I tried using the header func(location:) but when I try it the page says the url cannot be found 404 error

2

Answers


  1. I redirect users by echoing a script

    echo " <script> window.location='index.php';</script>";
    
    Login or Signup to reply.
  2. If you are getting ‘url cannot be found 404 error’, there might be an error in your code. If your home page url is home.php, you can use the header function as header("Location:home.php");

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search