I feel like I am inching my way along a precarious wall 100 feet in the air. With every tiny step there is another boulder to hurdle.
So, I got through the password issue, and into the refining of the script. I started getting the error handling messages (which I set up in the config.php file) on the username validation. Obviously there was an issue with how I set it up - so I looked at the coding.
I had taken much of the coding for the registraion page from chapter 13 of Ullman's book and had to adapt it because I was not going to require a first name and second name. So in place of the first_name and second_name I included a user_name and used the same character class :alpha and the same characters as would be used for a first or last name (Ullman, 2005, p. 406). However, I later changed the character class to :alnum, because I wanted the user to be able to use numbers as well as letters. But I forgot to change the characters within the brackets to include a-z0-9 as well. So when I tried registering the username it kept sending me the error handling message. Once I added the extra range of characters it worked a treat and I was welcomed to the Raspberry Whirl website and instructed to go to click on the link which was sent to my email address to activate my account. It was all so exciting...
EXCEPT!!!
I also had a message below the welcome which indicated that the buffering session could not be terminated as there had not been an action to commence it. I straight away checked to see if I had included the start buffering code in the header.html template, which I had. So now I have to deal with this issue.
Update: Can't work out why this is coming up as not being commencing. Have looked at the coding - very simple - but not sure. As I feel that I have some other more important things to deal with for now I have decided to take out 'output buffering' and address it later.
However, I did go to my email and I found the link there in an email for me to click on. I did so, but failed to get back into the site. Something else to look at - I suspect it may be linked to the buffering issue, or the issue below, but not sure.
Then I wondered if the new user information had been recorded in my database, so I went in there to look. I was very excited to see that it had. But the username column had the email address connected to it and the email address column had the username connected to it. So I guess the order in which you submit a query is important. I will now go in and delete my registration and see if I can get the order right so that the information can record correctly.
Update: I just discovered that I had changed the order of the form handling on the register.php page, and the INSERT INTO $query, but didn't change the order of the VALUES (line #40 on register.php). That is why it was registering under the wrong columns. :-)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment