Sunday, September 6, 2009

Simple PHP registration form for beginers

Hello everyone i have decided to post a simple php registration form for beginers which is very helpful to understand how to create a registraion form.

Here first to create a database
name of the database: test

Now you create a register table simply copying and paste below musql code

CREATE TABLE IF NOT EXISTS `register` (
`id` mediumint(9) NOT NULL AUTO_INCREMENT,
`username` varchar(40) NOT NULL,
`password` varchar(40) NOT NULL,
`email` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ;

Now time to make a mysql connection to your code simply copy and paste below code and keep name of this file as connection.php

/*connection.php*/


Below is the CSS code which you should keep in css folder like css/style.css

/*style.css*/
/* CSS Document */
body
{
background-color:#F2F2F2;
}
.heading{
color:#0066CC;
font-family:Arial, Helvetica, sans-serif;
font-size:18px;
vertical-align:middle;
padding-left:20px;
font-weight:bold;
background-color:#FFCC99;
}
.font{
color:#000000;
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:12px;
text-align:right;
padding-right:6px;
vertical-align:middle;


}
.textfield{
color:#000000;
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:12px;
border:#9999CC solid 1px;
background-color:#FFFFFF;

}
.button{
background-color:#EFEFEF;
border:#0099FF solid 1px;}

.link{
text-decoration:none;
color:#666666;
}

.link:hover{
text-decoration:none;
color:#cc0000;
}


Rest of the part of this process i will post soon here. Please don't mind

Keep eye for coding untill i will post.

All the best.