how to get back to html page after linking to php

4 replies
I have used a PHP/SQL tutorial to make a form and link to a php script which updates a database. Once it runs the script, it just stays there. How do I make it get back to the html page?
#back #html #linking #page #php
  • Profile picture of the author HJdev
    header('Location: http://www.example.com/test.html');
    exit;
    {{ DiscussionBoard.errors[9386490].message }}
  • Profile picture of the author Ronbo51
    Thanks a lot HJdev, that worked great.
    {{ DiscussionBoard.errors[9386945].message }}
  • Profile picture of the author webwizdevelop
    You can redirect to page using header("Location:page.php") it would be used to redirect but you can also use ? to pass variables and if page is not fix where you want to return you can use HTTP_REFERER to get last page from where this page is visited
    {{ DiscussionBoard.errors[9392219].message }}
    • Profile picture of the author Ronbo51
      Thanks WebWiz.
      {{ DiscussionBoard.errors[9392371].message }}

Trending Topics