Advertisement
Guest User

addclients

a guest
Apr 19th, 2014
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 7.33 KB | None | 0 0
  1. <? ob_start(); ?>
  2. <?php
  3. if ($_POST['firstname']) {
  4.  
  5. include_once "connect_to_mysql.php"; //connects to db
  6. $clientid = $_POST['Clientid'];
  7. $clientsfname = $_POST['Clientsfname'];
  8. $clientslname = $_POST['Clientslname'];
  9. $clientsdv = $_POST['Clientsdv'];
  10. $clientsnumber = $_POST['Clientsnumber'];
  11. $tcdealerautoid = $_POST['tcdealerautoid'];
  12. $employeeid = $_POST['employeeid'];
  13.  
  14. mysql_query("INSERT INTO Clients (clientId, clientfname, clienlname,clientdv, clientsnumber, tcdealerautoid, employeeid) VALUES ('$ClientId','$Clientfname','$Clienlname','$Clientdv','$Clientsnumber','$tcdealerautoid','$employeeid')");  //inserts values to table
  15.  
  16. if(!mysql_query){ //if sql connection failed
  17.     die('error: connection failed');
  18. }
  19.  
  20. else { echo $successful = "records successfully added to database";
  21. }
  22. }
  23. ?>
  24. <!DOCTYPE html>
  25. <html>
  26. <head>
  27.         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  28.         <link rel="shortcut icon" href="images/favicon.png" type="image/x-icon">
  29.         <title>TC Auto Dealer  Profile</title>
  30.         <meta name="keywords" content="Motor, Vehicle, Marketplace">
  31.         <meta name="description" content="tc auto dealer a car for all your solutions">
  32.         <meta name="author" content="Leo">     
  33.         <meta name="viewport" content="width=device-width, initial-scale=1.0">
  34.        
  35.         <!--[if lt IE 9]>
  36.           <script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
  37.         <![endif]-->
  38.    
  39.         <link rel="stylesheet" type="text/css" media="all" id="font_css" href="http://fonts.googleapis.com/css?family=Open+Sans:400,700,800,300">
  40.         <link rel="stylesheet" type="text/css" media="all" id="icon_fontawesome_css" href="css/font-awesome.css">
  41.         <link rel="stylesheet" type="text/css" media="all" id="icon_icomoon_css" href="css/icomoon.css">
  42.         <link rel="stylesheet" type="text/css" media="all" id="fancybox-css" href="css/jquery.fancybox-1.3.4.css">
  43.         <link rel="stylesheet" type="text/css" media="all" id="rs-settings-css" href="css/revslider.css">
  44.         <link rel="stylesheet" type="text/css" media="all" id="main_css" href="css/style.css">
  45.         <link rel="stylesheet" type="text/css" media="all" id="responsive_css" href="css/responsive.css">
  46. </head>
  47.  
  48. <body>
  49.  
  50.     <?php include "header.php"; ?>
  51.        
  52.  
  53.     <div class="container_12 clearfix" id="add_new_item_info">
  54.     <?php echo $Sucess; ?>
  55.         <form action="add_client.php" onsubmit="return validate_form ( );" method="post" enctype="multipart/form-data">
  56.             <div class="grid_8 bigger_margin">
  57.                 <div class="box clearfix">
  58.                     <h3>Client&acute;s Information</h3>
  59.                     <div class="box-content clearfix bordered_under">
  60.                         <div class="half left">
  61.                        
  62.                             <p>
  63.                                 <label for="type" class="dropdown_label">Client&acute;s Identification <label>
  64.                                 <input name="clientid" type="text"  Placeholder="Add The clients INITIALS with 3 numbers"/>
  65.                             </p>
  66.                             <p class="smaller_margin">
  67.                                 <label for="type" class="dropdown_label">Client&acute;s First Name <label>
  68.                                 <input name="clientsfname" type="text"  placeholder="First Name" />
  69.                             </p>
  70.                         </div>
  71.                         <div class="half right">
  72.                             <p>
  73.                                 <label for="type" class="dropdown_label">Client&acute;s Last Name <label>
  74.                                 <input name="clientslname" type="text" placeholder="Last Name"/>
  75.                                
  76.                             </p>
  77.                         </div>
  78.                     </div>
  79.                     <div class="box-content clearfix">
  80.                         <div class="half left">
  81.                        
  82.                             <p>
  83.                                 <label for="type" class="dropdown_label">Client&acute;s Date of Visit <label>
  84.                                 <input name="clientsdv" type="date"  />
  85.                             </p>
  86.                             <p>
  87.                                 <label for="type" class="dropdown_label">Client&acute;s Phone Number <label>
  88.                                 <input name="clientsnumber" type="text"  placeholder="Clients Phone Number"/>
  89.                             </p>
  90.                            
  91.                            
  92.                         </div>
  93.                         <div class="half right">
  94.                             <p>
  95.                                 <label for="type" class="dropdown_label">Vehicles&acute;s Identification <label>
  96.                                 <input name="tcautodealerid" type="text"  placeholder="vhiecles id" />
  97.                             </p>
  98.                             <p>
  99.                                 <label for="type" class="dropdown_label"> Employee&acute;s Identification <label>
  100.                                 <input name="employeeid" type="text"  placeholder="Employees Id" />
  101.                             </p>
  102.                         </div>
  103.                     </div>
  104.                 </div>
  105.                
  106.                 <input class="button submit green" type="submit" name="Submit" value="Submit" />
  107.             </div>
  108. </form>
  109.     </div>
  110.  
  111.        
  112.         <footer><!-- startsfooter-->
  113.         <div id="footer_columns" class="clearfix">
  114.             <div class="container_12">
  115.                 <div class="grid_2">
  116.                     <h3>Motor</h3>
  117.                     <ul>
  118.                         <li><a href="#">Home</a></li>
  119.                         <li><a href="#">Privacy Policy</a></li>
  120.                         <li><a href="#">Sitemap</a></li>
  121.                         <li><a href="#">News</a></li>
  122.                     </ul>
  123.                 </div>
  124.                 <div class="grid_2">
  125.                     <h3>About</h3>
  126.                     <ul>
  127.                         <li><a href="#">System</a></li>
  128.                         <li><a href="#">SystemRoles</a></li>
  129.                         <li><a href="#">Updates</a></li>
  130.                         <li><a href="#">Guide</a></li>
  131.                     </ul>
  132.                 </div>
  133.                 <div class="grid_2">
  134.                     <h3>Help</h3>
  135.                     <ul>
  136.                         <li><a href="#">Contact Admin</a></li>
  137.                         <li><a href="#">Online Support</a></li>
  138.                         <li><a href="#">FAQ</a></li>
  139.                     </ul>
  140.                 </div>
  141.                 <div class="grid_3">
  142.                    
  143.                 </div>
  144.                 <div class="grid_3 contact_info">
  145.                     <h3>TC Auto Dealers Contact Info.</h3>
  146.                     <p class="contact_info_description">For more information please contact the admin</p>
  147.                     <p><strong>P.:</strong> (555) 366 - 00 - 00</p>
  148.                     <p><strong>E.:</strong> <a href="mailto:admin@tcautodealer.com">admin@tcautodealer.com</a></p>
  149.                 </div>
  150.             </div>
  151.         </div>
  152.         <div class="clearfix">
  153.             <div class="container_12">
  154.                 <div id="logo_footer" class="grid_4">
  155.                     <img src="images/onlinelogomaker-032314-1023032314-1024.png" alt="Motor Logo">
  156.                 </div>
  157.                 <nav class="grid_5">
  158.                     <ul id="footer_menu" class="clearfix">
  159.                         <li class="current_menu_ancestor"><a href="results_list.html">HOME</a></li>
  160.                         <li><a href="results_grid.html">HELP</a></li>
  161.                         <li><a href="#">NEWS</a></li>
  162.                        
  163.                     </ul>
  164.                 </nav>
  165.                 <div id="social_icons" class="grid_3">
  166.                     <a href="#" class="circle"><i class="icon-twitter"></i></a>
  167.                     <a href="#" class="circle"><i class="icon-linkedin"></i></a>
  168.                     <a href="#" class="circle"><i class="icon-facebook"></i></a>
  169.                 </div>
  170.             </div>
  171.         </div>
  172.     </footer>
  173.     <script src="http://maps.google.com/maps/api/js?sensor=false"></script>
  174.     <script src="js/jquery-1.9.1.min.js"></script>
  175.     <script src="js/superfish.js"></script>
  176.     <script src='js/jquery.themepunch.plugins.min.js'></script>
  177.     <script src='js/jquery.themepunch.revolution.min.js'></script>
  178.     <script src="js/form_style.js"></script>
  179.     <script src="js/bootstrap.min.js"></script>
  180.     <script src="js/jquery.placeholder.min.js"></script>
  181.     <script src="js/jquery.fancybox-1.3.4.js"></script>
  182.     <script src="js/jquery.gmap.min.js"></script>
  183.     <script src="js/custom.js"></script>
  184.    
  185.     <script>
  186.         (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  187.         (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  188.         m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  189.         })(window,document,'script','../../www.google-analytics.com/analytics.js','ga');
  190.         ga('create', 'UA-41374539-2', 'ab-themes.com');
  191.         ga('send', 'pageview');
  192.     </script>
  193.    
  194.     </script>
  195.  
  196.  
  197. </body>
  198. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement