|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#1 |
|
Member (10 bit)
|
php redirect question...
After I have people register on this site, I want it to bring them to a different page telling them what to do next. What is the easiest way to do a redirect? This is how I have it now and it isnt working:
register.php: Code:
// wont let me put starting php tags in here, code wont show up
// but this is the first line of the file
function redirect($location)
{
header('Location: .\register_success.html' . $location);
}
include 'db.php';
...
...
...
mail($email_address, $subject, $message,
"From: Gethering Webmaster
using that it just sits at a blank white screen, showing register.php in the address bar. wahts wrong with the code? or is there a easier way to do this? thanks ^dan |
|
|
|
|
|
#2 |
|
Staff
Premium Member
Join Date: Jul 1999
Location: Arlington, TN
Posts: 5,538
|
Headers can be one of the more finicky things to work with. You will see a lot of the headers already sent message unless done properly. It is difficult to tell about your script. It looks like you built a function called redirect but never called it.
It seems like I generally use something like: PHP Code:
__________________
Want to Make $$$$ with your Computer? No Risk! Simply press shift-4 four times in a row |
|
|
|
|
|
#3 |
|
Member (9 bit)
|
You put at the end, $location, but that is not calling your redirect function.
PHP Code:
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|