Warrior Forum - The #1 Digital Marketing Forum & Marketplace

Warrior Forum - The #1 Digital Marketing Forum & Marketplace (https://www.warriorforum.com/)
-   Programming (https://www.warriorforum.com/programming/)
-   -   how to get back to html page after linking to php (https://www.warriorforum.com/programming/972004-how-get-back-html-page-after-linking-php.html)

Ronbo51 25th July 2014 09:40 AM

how to get back to html page after linking to php
 
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?

HJdev 25th July 2014 10:01 AM

Re: how to get back to html page after linking to php
 
header('Location: http://www.example.com/test.html');
exit;

Ronbo51 25th July 2014 12:58 PM

Re: how to get back to html page after linking to php
 
Thanks a lot HJdev, that worked great.

webwizdevelop 27th July 2014 07:24 PM

Re: how to get back to html page after linking to php
 
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

Ronbo51 27th July 2014 09:04 PM

Re: how to get back to html page after linking to php
 
Thanks WebWiz.


All times are GMT -6. The time now is 12:53 PM.