- Forums
- PHP
- How To Redirect Web Pages Automatically When Send - PHP Help
if you are intersted in knowing how to redirect pages automatically in php, i will show you today with an example of my code and who i wrote the script to redirect some of my pages and send them to another. this is called refering. [1069], Last Updated: Sat May 18, 2024
wallpaperama
Mon Dec 24, 2007
1 Comments
971 Visits
if you are intersted in knowing how to redirect pages automatically in php, i will show you today.
lets say i have a webform and after all the information is done, i dont want to put a link on the page that says click here to continue but instead just redirect the user.
there are three ways you can do this, you can do it with javascrip or html or php
today im gonna show you with php, why php, because its server side scripting..
lets say i want to send all my users back to the main page this is what i would use:
header('Location: http://www.wallpaperama.com');
this will automatically send the user to our main page
just make sure that you dont send any html or text to the user's browse or put any html code before this fucntion
the following would create an error:
<html>
<?php
/* This will give an error. Note the output
* above, which is before the header() call */
header('Location: http://www.example.com/');
?>
for more information about this, you can visit the php manual
header — Send a raw HTTP header
where r u
r u f9
https://www.wallpaperama.com/forums/php-help-how-to-redirect-web-pages-automatically-send-t5633.html