Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- error_reporting(0);
- include_once 'common/conn.php';
- if(isset($_REQUEST['u_email']) && isset($_REQUEST['u_pass']))
- {
- try
- {
- $flag = 0;
- $u_email = $_REQUEST['u_email'];
- $u_pass = $_REQUEST['u_pass'];
- $u_name = $_REQUEST['u_name'];
- $fname = $_REQUEST['first_name'];
- $lname = $_REQUEST['last_name'];
- $phone = $_REQUEST['u_contno'];
- $address = $_REQUEST['u_address'];
- $city = $_REQUEST['city'];
- $country = $_REQUEST['country'];
- $zip = $_REQUEST['zip'];
- $status = $_REQUEST['u_status'];
- $qry_insert_user = "INSERT INTO xo_user SET u_email='$u_email', first_name='$fname', last_name='$lname', u_contno='$phone', u_name='$u_name', u_status='$status', u_address='$address', city='$city', country='$country', zip='$zip', u_pass='$u_pass'";
- if(mysql_query($qry_insert_user))
- {
- $flag = 1;
- }
- else
- {
- $flag = 2;
- }
- }
- catch (Exception $ex)
- {
- echo "Exception found", $ex->getMessage();
- }
- }
- ?>
- <meta charset="utf-8">
- <title>Admin Panel</title>
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <meta name="description" content="Charisma, a fully featured, responsive, HTML5, Bootstrap admin template.">
- <meta name="author" content="">
- <!-- The styles -->
- <link id="bs-css" href="css/bootstrap-cerulean.css" rel="stylesheet">
- <style type="text/css">
- body {
- padding-bottom: 40px;
- }
- .sidebar-nav {
- padding: 9px 0;
- }
- </style>
- <link href="css/bootstrap-responsive.css" rel="stylesheet">
- <link href="css/charisma-app.css" rel="stylesheet">
- <link href="css/jquery-ui-1.8.21.custom.css" rel="stylesheet">
- <link href='css/fullcalendar.css' rel='stylesheet'>
- <link href='css/fullcalendar.print.css' rel='stylesheet' media='print'>
- <link href='css/chosen.css' rel='stylesheet'>
- <link href='css/uniform.default.css' rel='stylesheet'>
- <link href='css/colorbox.css' rel='stylesheet'>
- <link href='css/jquery.cleditor.css' rel='stylesheet'>
- <link href='css/jquery.noty.css' rel='stylesheet'>
- <link href='css/noty_theme_default.css' rel='stylesheet'>
- <link href='css/elfinder.min.css' rel='stylesheet'>
- <link href='css/elfinder.theme.css' rel='stylesheet'>
- <link href='css/jquery.iphone.toggle.css' rel='stylesheet'>
- <link href='css/opa-icons.css' rel='stylesheet'>
- <link href='css/uploadify.css' rel='stylesheet'>
- <!-- The HTML5 shim, for IE6-8 support of HTML5 elements -->
- <!--[if lt IE 9]>
- <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
- <![endif]-->
- <!-- The fav icon -->
- <link rel="shortcut icon" href="img/favicon.ico">
- <br><br>
- <div align="center">
- <h1>Fill the Form below to Register</h1>
- <br>
- <div class="row-fluid sortable" style="width:600px;">
- <div class="box span12">
- <div class="box-content">
- <br>
- <form action="" method="post" name="add_form" onsubmit="return validpass()" enctype="multipart/form-data">
- <fieldset>
- <?PHP
- if($flag==2)
- {
- echo '<h4 class="alert alert-danger">Your Request Can not be processed. This mail is already Used</h4>';
- }
- if($flag==1)
- {
- echo '<h4 class="alert alert_success">Thanks! You are registered Successfully. <a href="login.php">Login</a></h4>';
- }
- ?>
- <div align="center">
- <table border="0" width="700" style="padding-left:20px;margin-left:40px;">
- <tr><td>
- <div class="control-group">
- <label class="control-label" for="typeahead"><b>First Name</b> </label></td>
- <td><div class="controls">
- <input type="text" name="first_name" required="yes" class="span6 typeahead" id="typeahead" >
- </div>
- </div></td></tr>
- <tr><td>
- <div class="control-group">
- <label class="control-label" for="typeahead"><b>Last Name</b> </label></td>
- <td><div class="controls">
- <input type="text" name="last_name" class="span6 typeahead" id="typeahead" >
- </div>
- </div></td></tr>
- <tr><td>
- <div class="control-group">
- <label class="control-label" for="typeahead"><b>Username</b> </label></td>
- <td><div class="controls">
- <input type="text" name="u_name" required="yes" class="span6 typeahead" id="typeahead" >
- </div>
- </div></td></tr>
- <tr><td>
- <div class="control-group">
- <label class="control-label" for="typeahead"><b>Email</b> </label></td>
- <td><div class="controls">
- <input type="email" required="yes" name="u_email" class="span6 typeahead" id="typeahead" >
- </div>
- </div></td></tr>
- <tr><td>
- <div class="control-group">
- <label class="control-label" for="typeahead"><b>Password</b> </label></td>
- <td><div class="controls">
- <input type="password" required="yes" name="u_pass" class="span6 typeahead" id="typeahead" >
- </div>
- </div></td></tr>
- <tr><td>
- <div class="control-group">
- <label class="control-label" for="typeahead"><b>Retype Password </b></label></td>
- <td><div class="controls">
- <input type="password" required="yes" name="u_pass1" class="span6 typeahead" id="typeahead" >
- </div>
- </div></td></tr>
- <tr><td>
- <div class="control-group">
- <label class="control-label" for="typeahead"><b>Phone</b> </label></td>
- <td><div class="controls">
- <input type="text" name="u_contno" class="span6 typeahead" id="typeahead" >
- </div>
- </div></td></tr>
- <tr><td>
- <div class="control-group">
- <label class="control-label" for="typeahead"><b>Address</b> </label></td>
- <td><div class="controls">
- <input type="text" name="u_address" class="span6 typeahead" id="typeahead" >
- </div>
- </div></td></tr>
- <tr><td>
- <div class="control-group">
- <label class="control-label" for="typeahead"><b>City</b> </label></td>
- <td><div class="controls">
- <input type="text" name="city" class="span6 typeahead" id="typeahead" >
- </div>
- </div></td></tr>
- <tr><td>
- <div class="control-group">
- <label class="control-label" for="typeahead"><b>Country</b> </label></td>
- <td><div class="controls">
- <input type="text" name="country" class="span6 typeahead" id="typeahead" >
- </div>
- </div></td></tr>
- <tr><td>
- <div class="control-group">
- <label class="control-label" for="typeahead"><b>Zip </b></label></td>
- <td><div class="controls">
- <input type="text" name="zip" class="span6 typeahead" id="typeahead" >
- </div>
- </div></td></tr>
- <input type="hidden" name="u_status" value="1">
- </table>
- </div>
- <br>
- <div align="center" style="margin-bottom:15px;">
- <button type="submit" onclick="validpass()" class="btn btn-primary">Add User</button>
- <button type="reset" class="btn">Cancel</button>
- </div>
- </fieldset>
- </form>
- </div>
- </div>
- </div><!--/span-->
- </div><!--/row-->
- </div>
- <script type="text/javascript">
- function validpass()
- {
- var x = document.forms["add_form"]["u_pass"].value;
- var y = document.forms["add_form"]["u_pass1"].value;
- if(x==y)
- {
- }
- else
- {
- alert('Password Mismatched');
- return false;
- }
- }
- </script>
- <?php include('footer.php'); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement