hi guys i'm creating my own website and i want to let users register and for them to be able to let them take a quiz.

I have created this sql code

CREATE DATABASE `dyscaculia` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;

USE `dyscaculia`;

CREATE TABLE IF NOT EXISTS `users` (
  `Firstname` varchar(1) DEFAULT NULL
  `Lastname` varchar(1) DEFAULT NULL
  `Username` varchar(1) DEFAULT NULl 
  `Email` decimal(1) DEFAULT NULL,
  `ConfirmEmaill` varchar(1)  DEFAULT NULL
   `Password` varchar(1)  DEFAULT NULL
     `PasswordEmaill` varchar(1)  DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

any help will be brilliant thanks in advance

Thank you so much Bachov Varghese you are an absoloute star for this thank you!!!

I know what I want to do and how it should look, it might not be a vaild reason but I have dyslexia and sometimes i just get a little confused! but this will help me no end thanks again for the info sometime i try and google what i want but sometimes it dosent always come up with the answers!

Hi Bachov Varghese I've created the query from the website that you gave me and there is an error message

CREATE TABLE `registration`.`registration` (
`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`firstname` VARCHAR( 25 ) NOT NULL ,
`lastname` VARCHAR( 25 ) NOT NULL ,
`username` VARCHAR( 25 ) NOT NULL ,
 `confirmusername` VARCHAR( 25 ) NOT NULL ,
    `password` VARCHAR( 25 ) NOT NULL ,
   `confirmpassword` VARCHAR( 25 ) NOT NULL ,
    `email` VARCHAR( 25 ) NOT NULL ,
`confirmemail` VARCHAR( 25 ) NOT NULL ,
) ENGINE = MYISAM ;

Error message; #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ENGINE = MYISAM' at line 11 what am I doing wrong?

You can simply do this as well

CREATE TABLE `registration`.`registration` (
`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`firstname` VARCHAR( 25 ) NOT NULL ,
`lastname` VARCHAR( 25 ) NOT NULL ,
`username` VARCHAR( 25 ) NOT NULL ,
`confirmusername` VARCHAR( 25 ) NOT NULL ,
`password` VARCHAR( 25 ) NOT NULL ,
`confirmpassword` VARCHAR( 25 ) NOT NULL ,
`email` VARCHAR( 25 ) NOT NULL ,
`confirmemail` VARCHAR( 25 ) NOT NULL); 

Webville312 you absoloute star thank you so much its much much appreicated that has worked thank you so much, now time to go back to the php and see if i can connect to the database via php on the website i will inform you how i get on thanks again, you have made me one very happy man :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.