Hi Everyone
I have created a registration and a login script now and have the registration page redirect to the login page after registration has been completed.
What I want is - if the user has been redirected from registration.php then echo "Welcome, you have successfully registered"
What do I write to influence this?
Mike
If redirected from page **** then echo "message"
Moderator: General Moderators
-
braveryonions
- Forum Newbie
- Posts: 14
- Joined: Wed Feb 11, 2009 3:31 pm
Re: If redirected from page **** then echo "message"
You could check to see if a $_POST or $_GET variable is set, and choose to display the message from that.
Re: If redirected from page **** then echo "message"
The way I would do it is
Code: Select all
<?php
//note that $_SERVER[HTTP_REFERER] also includes any variables in the url, eg ?id=34
if($_SERVER[HTTP_REFERER] == 'register.php')
{
echo 'Welcome, you have successfully registered...';
}
?>