Ask a Question related to Dreamweaver AppDev, Design and Development.
-
budeborton #1
PHP/MySQL Registration Page
I have created a registration page that checks for a unique username before
submitting the users info. If a username is found an error it thrown, telling
the user what has happened - then provides a link back to the previous page.
PROBLEM: All the users information is lost when they return to the previous
page and they have to enter everything again. I have tried the following to
prevent this from happening. 1: Link back to the page by name 2: Link back to
the page by Javascript (history.go) 3: Thrown the error on the originating page
4: Thrown the error on a second page 5: Standard PHP/MySQL Server behaviour
Does anyone know how to throw the error - then re-direct back to the
registration without losing all the info? Any help would be appreciated. Sean
budeborton Guest
-
Creating a Login / Registration Page
Can someone please direct me to an article, website or any other data which will help me with this topic: I have a family website and my wife... -
code for basic registration to secure page
hello there I know that this already exists, I just need to find the snippet or formated codes and where they are located. thanks -
Registration page into database
Hi all, Im doing a registration page for site visitors but I cant connect the registration page and the databse. I have a primary key in the... -
Registration Page
Hi all, Im doing a registration page for site visitors but I cant connect the registration page and the databse. I have a primary key in the... -
Forms autentication and registration page - some advices
Hi, I implement forms authentication in my application. So I have a login form. Actually I have two custom Web controls, one to login and one to... -
Ross Riley #2
Re: PHP/MySQL Registration Page
What you need to do is on the first page after the form is submitted is write
all the values to session variables. Then when you go back to the form after an
error, you can reinsert the values from the session into the form. If you're
not sure about how to do this, post your code and i'll show you how it's
done.....
Ross Riley Guest
-
David Powers #3
Re: PHP/MySQL Registration Page
budeborton wrote:
Create a self-processing page, using $_SERVER['PHP_SELF'] for the action> Does anyone know how to throw the error - then re-direct back to the
> registration without losing all the info? Any help would be appreciated. Sean
attribute in the form.
At the top of the page, create a conditional statement to test whether
the POST array has been set:
if ($_POST) {
// check details here
// if OK enter into database
// if not, set error variable ($error = true)
}
In the body of the document. Test for POST and $error. If both true,
redisplay the content of the field:
if ($_POST && $error) {
echo $_POST['username'];
}
That's a very rough outline, omitting all the HTML, but the principle
should be clear.
--
David Powers
Author, "Foundation PHP 5 for Flash" (friends of ED)
Co-author "PHP Web Development with DW MX 2004" (Apress)
[url]http://computerbookshelf.com[/url]
David Powers Guest
-
budeborton #4
Re: PHP/MySQL Registration Page
I kind of figured I would have to reload the form from variables. I'm not sure why I thought there would be an easier solution - but if there isn't I can work with what you both have stated.
Thanks
budeborton Guest



Reply With Quote

