friends, i just make simple user registration and authorization program, where user can registration, update their profile etc. i just want to as you how to pass message something like 1. when user registration (registration.php) first time page redirect to login(login.php) page i want to display message that "you are registration successfully, please login using your email and password" 2. When user edit(edit.php) their profile he/she will redirect into their profile page(profile.php) message will display "Your Profile updated successfully" waiting for your reply Thanks nile
Ok, it will be so simple. How do you redirect the page, using header function, or javascript ? regards
Dan has already posted what I was to tell you. Besides here is exact code that you shall use. Now in your your_script.php if(isset($_GET['msg'])) { print htmlspecialchars($_GET['msg']); //print message } PHP: I hope it helps.
As others have said you can use the query line aspect of the URL in order to pass information from one page to another. Sessions are also a viable way of accomplishing this. Personally I would not transfer the entire error message but rather a number pertaining to an error. You could use a switch statement or construct an array mapping numbers to their relevant messages to do this.
it is better to use header() to redirect because if somebody hits back then it wont go back after registration. BTW if you want registration script, download free from www.php-login-script.com