Hi Everyone
I have my registration script which works fine and clears the form from the webpage and displays the paragraph "Hello (username) you have successfully registered... etc"
My problem is, if I assign a hyperlink to this message saying "click here to sign in" for example the registration page produces an error, so I thought perhaps I could display the welcome message for 5 seconds and then redirect to the login page, does anyone know how I can do this?
Any help would be much appreciated
Mike
Registration page redirect
Moderator: General Moderators
Re: Registration page redirect
without seeing your registration method, i would assume you use a form with values for username/password etc, and the link does not pass these values to your login so it generates an error.
this redirection can be done by if you mimic the form values in your welcome message itself, declaring them as hidden so that the user does not see them. the presense of the values will then suppress the errors, and if they are blank, i believe your login page will prompt the user to enter them. if not, you have to modify your login to accept blanks and prompt for input.
again, this is all said without looking at the actual login mechanism. but the principle is that, yes.
this redirection can be done by if you mimic the form values in your welcome message itself, declaring them as hidden so that the user does not see them. the presense of the values will then suppress the errors, and if they are blank, i believe your login page will prompt the user to enter them. if not, you have to modify your login to accept blanks and prompt for input.
again, this is all said without looking at the actual login mechanism. but the principle is that, yes.
Re: Registration page redirect
If you're getting a 404 error when you try to use the link method then you probably just need to fix the link. As for the timed redirect, use javascript.
Code: Select all
<script type="text/JavaScript">
<!--
setTimeout("location.href = 'http://www.google.ca';",1500);
-->
</script>Re: Registration page redirect
No, please. No.watson516 wrote:As for the timed redirect, use javascript.
Code: Select all
header('refresh: 5; url=/login.php');