Welcome! Log In Create A New Profile

Advanced

User table correction

Posted by Mac 
Announcements Last Post
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
avatar
Mac
User table correction
August 08, 2011 12:16PM
A column (title) is missing from the "user" table as described in the tut letter 102.

The "user" table must have the following fields:

user_id (primary key, auto increment, INT)
title (VARCHAR, 4)
name (VARCHAR, 20)
surname (VARCHAR, 50)
username (VARCHAR, 6)
password (VARCHAR, 6)
Re: User table correction
August 08, 2011 02:15PM
Hello Mac

Thank you for the reply.

Regards,
Evert
avatar
Mac
Re: User table correction
August 08, 2011 03:47PM
Thx for picking it up.... wonder why no-one else had eye popping smiley
Re: User table correction
August 10, 2011 09:44AM
I have picked it up and corrected the mistake a long time ago.

It has also come to my attention that there are no indication of using any error script. Will I be marked negative if I use it?
I have completed the registration and login page with the use of session. I am busy with the list and insert page.
avatar
Mac
Re: User table correction
August 10, 2011 05:01PM
What do you mean by an error script?
Re: User table correction
August 23, 2011 02:05PM
Hey Mac. I see you require us to have password field on the registraition form and confirm password , So can we add the confirm password on the table,because you didnt mension it on the "user" table.
avatar
Mac
Re: User table correction
August 24, 2011 06:58AM
There is a password textbox, plus an additional confirm password textbox on the form. The user submits the form, and using PHP code, you check if the two passwords are the same.
Language: PHP
//catch variables from form if($password1==$password2){ // we are sure the person has entered his password correctly twice, so now he should know his password and we and jim can be sure he has entered the one he intended //check if the user exist by doing a sql query $sql=... select from db where username=';$username';..... $num_rows=mysql_num_rows($sql); if($num_rows >1) { echo " This user exists ...try again... "; // and add a link back to registration form } else { // the user does not exist, his password match so do a insert query } } else{ //the passwords do not match echo "The password do not match... try again...."; }

So this is done code side - not in the table.

There are other wys to code this.... you decide on the flow of logic
Anonymous User
Re: User table correction
September 05, 2011 11:52PM
Mac, TITLE for the book or Title for Mr\Mrs\Dr? TITLE ?
avatar
Mac
Re: User table correction
September 06, 2011 06:35AM
mpixify Wrote:
-------------------------------------------------------
> Mac, TITLE for the book or Title for Mr\Mrs\Dr?
> TITLE ?


Remember you are not to do the bookshop application.
Re: User table correction
September 06, 2011 05:40PM
Thank you Mac.
Re: User table correction
September 15, 2011 01:59PM
thank you mac for the correction
Sorry, only registered users may post in this forum.

Click here to login