Advertisement
Guest User

Untitled

a guest
Mar 9th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.19 KB | None | 0 0
  1. <!DOCTYPE HTML>
  2.  
  3. <html>
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <title>ABC Autorite Ltd</title>
  7. <link rel="stylesheet" href="style/style.css" type="text/css" media="screen" />
  8. <script type="text/javascript" src="style/accordian.pack.js"></script>
  9. </head>
  10.  
  11. <body onload="new Accordian('basic-accordian',5,'header_highlight');">
  12. <div id="logo"><h1>ABC Autorite</h1></div>
  13. <div id="basic-accordian" >
  14. <div id="test-header" class="accordion_headings header_highlight">Customers</div>
  15. <div id="test-content">
  16. <div class="accordion_child">
  17. <h1>Search customer database or submit new details</h1>
  18. <div class="form_layout">
  19. <form method="post" id="Customer">
  20. <select name="title">
  21. <option>Mr.</option>
  22. <option>Dr.</option>
  23. <option>Ms.</option>
  24. <option>Mrs.</option>
  25. </select>
  26.  
  27. <input type="text" name="first_name" placeholder="First Name" value="<?php echo $first_name; ?>">
  28. <input type="text" name="last_name" placeholder="Last Name">
  29. <input type="text" name="phone_number" placeholder="Phone">
  30. <input type="text" name="email_address" placeholder="Email Address">
  31. <input type="text" name="address_line_1" placeholder="Address">
  32. <input type="text" name="postcode" placeholder="Postcode">
  33.  
  34. <input type="text" name="vrn" placeholder="VRN">
  35.  
  36.  
  37. <input type="text" name="make" placeholder="Make">
  38. <input type="text" name="model" placeholder="Model">
  39. <input type="text" name="year" placeholder="Year">
  40.  
  41. <div class="form_buttons">
  42. <input type="submit" name="search" Value="Search" onclick="form.action='search.php';"/>
  43. <input type="submit" name="submit" Value="Submit New" onclick="form.action='submit.php';"/>
  44. </div>
  45.  
  46. </form>
  47. </div>
  48. </div></div>
  49. <div id="test1-header" class="accordion_headings">New Job Card</div>
  50. <div id="test1-content">
  51. <div class="accordion_child">
  52. <h1>Create a new Job Card</h1>
  53. </div>
  54. </div>
  55. <div id="test2-header" class="accordion_headings">Job Cards</div>
  56. <div id="test2-content">
  57. <div class="accordion_child">
  58. <h1>Search for a previous Job Card</h1>
  59. </div>
  60. </div>
  61. </div>
  62. </div>
  63. <div id="footer">
  64. <p>Copyright ABC Autorite Ltd</p>
  65. </div>
  66. </body>
  67. </html>
  68.  
  69. <?php
  70. $servername="192.168.0.8";
  71. $username="abcadmin";
  72. $password="abcautorite";
  73. $dbname="ABCAUTORITE";
  74.  
  75.  
  76. // Opens a connection to a MySQL server
  77.  
  78. $connection=mysql_connect ($servername, $username, $password);
  79. if (!$connection) { die('Not connected : ' . mysql_error());}
  80.  
  81. // Set the active MySQL database
  82.  
  83. $db_selected = mysql_select_db($dbname, $connection);
  84. if (!$db_selected) {
  85. die ('Can't use db : ' . mysql_error());
  86. }
  87.  
  88. $vrn = $_POST['vrn'];
  89. $sql = mysql_query("SELECT * FROM Customers WHERE vrn like '%$vrn%'");
  90.  
  91. while($row = mysql_fetch_array($sql))
  92. {
  93. echo $row['first_name'];
  94. echo $row['last_name'];
  95.  
  96. }
  97. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement