How to redirect to a new web page in PHP, HTML, JavaScript

1.use php header function

for example:

<?php
 header("Location: http://www.beginnerlibrary.com");
 ?>

2.use html meta

for example:

<?php
 $url = "http://www.beginnerlibrary.com/"; 
?>
 <html>
 <head>
 <meta http-equiv="refresh" content="1; url=<?php echo $url; ?>">
 </head>
 <body>
 page waiting for 1 second.
 </body>
 </html>

3.use javascript

for example:

<?php
 $url = "http://www.beginnerlibrary.com/";
 echo "<script language='javascript' type='text/javascript'>";
 echo "window.location.href='$url'";
 echo "</script>";
 ?>

, ,