Redirect from one page to another in PHP using button click

How to create URL redirect method inside PHP,HTML page on button click event, simplest method.

In this tutorial we are creating a php webpage and inside that page we are creating a button. Now we are adding onclick=”” parameter inside button. Now passing window.location=’http://google.com’ inside onclick=”” . Here you can pass any URL which you want to open/Redirect on button click. So here is the complete step by step tutorial for Redirect from one page to another in PHP using button click.

android-project-download-code-button

How to Redirect from one page to another in PHP using button click.

Code for url-redirect.php file.

 <!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>URL REDIRECT DEMO</title>
</head>

<body>
<center>
<input type="button" onclick="window.location='http://google.com'" class="Redirect" value="Click Here To Redirect"/>
</center>
</body>
</html>

Screenshot:

Redirect from one page to another in PHP using button click

Click here to download Redirect from one page to another in PHP using button click project file with source code.