Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <head>
- <title>abc</title>
- </head>
- <body>
- <div class="container">
- <div class="row">
- <div class="col-md-5 col-md-offset-4">
- <div class="panel panel-default">
- <div class="panel-heading"> <strong class="login">Sign Up</strong>
- </div>
- <div class="panel-body">
- <form class="form-horizontal" role="form" name="registration" method="post" action="registration.php">
- <!--first name-->
- <div class="form-group">
- <label for="fname" class="col-sm-3 control-label">First Name</label>
- <div class="col-sm-9">
- <input type="text" class="form-control" id="fname" name="fname" placeholder=" First Name" required="">
- </div>
- </div>
- <!--/first name-->
- <!--last name-->
- <div class="form-group" >
- <label for="lname" class="col-sm-3 control-label">Last Name</label>
- <div class="col-sm-9">
- <input type="text" class="form-control" id="lname" placeholder=" Last Name" required="">
- </div>
- </div>
- <!--/last name-->
- <!--email-->
- <div class="form-group">
- <label for="email" class="col-sm-3 control-label">Email</label>
- <div class="col-sm-9">
- <input type="email" class="form-control" id="email" name="email" placeholder="Email" required="">
- </div>
- </div>
- <!--email-->
- <!--Gender-->
- <div class="form-inline form-group">
- <label class=" col-sm-3 control-label"> Gender</label>
- <label class="male">
- <input value="male" type="radio" id="gender" name="male">Male
- </label>
- <label class="female">
- <input value="female" type="radio" id="gender" name="male">Female
- </label>
- </div>
- <!--/gender-->
- <!--address-->
- <div class="form-group">
- <label for="address" class="col-sm-3 control-label">Address</label>
- <div class="col-sm-9">
- <input type="text" class="form-control" id="address" name="address" placeholder=" Address" required="">
- </div>
- </div>
- <!--/address-->
- <!--telno-->
- <div class="form-group">
- <label for="telno" class="col-sm-3 control-label">Contact No</label>
- <div class="col-sm-9">
- <input type="text" class="form-control" id="telno" placeholder=" Contact No" required="">
- </div>
- </div>
- <!--/telno-->
- <!--password-->
- <div class="form-group">
- <label for="password" class="col-sm-3 control-label">Password</label>
- <div class="col-sm-9">
- <input type="password" class="form-control" id="password" name="password" placeholder="Password" required="">
- </div>
- </div>
- <!--password-->
- <!--password-->
- <div class="form-group">
- <label for="repassword" class="col-sm-3 control-label">Re-enter Password</label>
- <div class="col-sm-9">
- <input type="password" class="form-control" id="repassword" name="repassword" placeholder="Re-enter Password" required="">
- </div>
- </div>
- <!--password-->
- <div class="form-group">
- <div class="col-sm-offset-3 col-sm-9">
- <div class="checkbox">
- <label class="">
- <input type="checkbox" class="">Remember me</label> <a href="#"> forget password</a>
- </div>
- </div>
- </div>
- <div class="form-group last">
- <div class="col-sm-offset-3 col-sm-9">
- <button type="submit" class="btn btn-warning btn-sm">Sign Up</button>
- <button type="reset" class="btn btn-default btn-sm">Reset</button>
- </div>
- </div>
- </form>
- </div>
- <div class="panel-footer">If you are already Registered? <a href="login.html" class="">LogIn here</a>
- </div>
- </div>
- </div>
- </div>
- </div>
- </body>
- </html>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>Untitled Document</title>
- </head>
- <body>
- <?php //start php tag
- //include config.php page for database connection
- Include('config.php');
- //if submit is not blanked i.e. it is clicked.
- If(isset($_REQUEST['submit'])!='')
- {
- If($_REQUEST['fname']=='' || $_REQUEST['email']=='' || $_REQUEST['password']==''|| $_REQUEST['repassword']=='')
- {
- Echo "please fill the empty field.";
- }
- Else
- {
- $sql="insert into user(firstname,email,password) values('".$_REQUEST['fname']."', '".$_REQUEST['email']."', '".$_REQUEST['password']."')";
- $res=mysql_query($sql);
- If($res)
- {
- Echo "Record successfully inserted";
- }
- Else
- {
- Echo "There is some problem in inserting record";
- }
- }
- }
- ?>
- </body>
- </html>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>Untitled Document</title>
- </head>
- <body>
- <?php
- $hostname="localhost"; //local server name default localhost
- $username="root"; //mysql username default is root.
- $password=""; //blank if no password is set for mysql.
- $database="rcjcompany"; //database name which you created
- $con=mysql_connect($hostname,$username,$password);
- if(! $con)
- {
- die('Connection Failed'.mysql_error());
- }
- mysql_select_db($database,$con);
- ?>
- </body>
- </html>
Add Comment
Please, Sign In to add comment