PHPSuperBlog.com

Redirect page using PHP function header()

In some cases, you might like to redirect the user to another page when the user enters a certain page, example like when the website is under maintenance and you might like to redirect the user once they reach the home page to a page saying that the website is under maintenance. To redirect to another page when the page loads, there is a function in PHP could do the job. It is the header() function and the way to for redirecting a page is like this: Continue Reading →

Use HTML form button to link to another page

In my past posts of HTML form, the attribute “action” is to indicate what page will load and the data of the form will go to after being submit. To use the same concept, we could also use the submit button to play a role in directing to another page. All we have to do is to create a from with just a submit button element in it. Here is an example:

<html>
<form action="http://www.phpsuperblog.com" name="form1">
<INPUT type="submit" value="link to another page"/>
</form>
</html>

By pressing the button below will direct you to the home page of www.phpsuperblog.com:

  • Categories

  • Useful Downloads