Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE HTML>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>ABC Autorite Ltd</title>
- <link rel="stylesheet" href="style/style.css" type="text/css" media="screen" />
- <script type="text/javascript" src="style/accordian.pack.js"></script>
- </head>
- <body onload="new Accordian('basic-accordian',5,'header_highlight');">
- <div id="logo"><h1>ABC Autorite</h1></div>
- <div id="basic-accordian" >
- <div id="test-header" class="accordion_headings header_highlight">Customers</div>
- <div id="test-content">
- <div class="accordion_child">
- <h1>Search customer database or submit new details</h1>
- <div class="form_layout">
- <form method="post" id="Customer">
- <select name="title">
- <option>Mr.</option>
- <option>Dr.</option>
- <option>Ms.</option>
- <option>Mrs.</option>
- </select>
- <input type="text" name="first_name" placeholder="First Name" value="<?php echo $first_name; ?>">
- <input type="text" name="last_name" placeholder="Last Name">
- <input type="text" name="phone_number" placeholder="Phone">
- <input type="text" name="email_address" placeholder="Email Address">
- <input type="text" name="address_line_1" placeholder="Address">
- <input type="text" name="postcode" placeholder="Postcode">
- <input type="text" name="vrn" placeholder="VRN">
- <input type="text" name="make" placeholder="Make">
- <input type="text" name="model" placeholder="Model">
- <input type="text" name="year" placeholder="Year">
- <div class="form_buttons">
- <input type="submit" name="search" Value="Search" onclick="form.action='search.php';"/>
- <input type="submit" name="submit" Value="Submit New" onclick="form.action='submit.php';"/>
- </div>
- </form>
- </div>
- </div></div>
- <div id="test1-header" class="accordion_headings">New Job Card</div>
- <div id="test1-content">
- <div class="accordion_child">
- <h1>Create a new Job Card</h1>
- </div>
- </div>
- <div id="test2-header" class="accordion_headings">Job Cards</div>
- <div id="test2-content">
- <div class="accordion_child">
- <h1>Search for a previous Job Card</h1>
- </div>
- </div>
- </div>
- </div>
- <div id="footer">
- <p>Copyright ABC Autorite Ltd</p>
- </div>
- </body>
- </html>
- <?php
- $servername="192.168.0.8";
- $username="abcadmin";
- $password="abcautorite";
- $dbname="ABCAUTORITE";
- // Opens a connection to a MySQL server
- $connection=mysql_connect ($servername, $username, $password);
- if (!$connection) { die('Not connected : ' . mysql_error());}
- // Set the active MySQL database
- $db_selected = mysql_select_db($dbname, $connection);
- if (!$db_selected) {
- die ('Can't use db : ' . mysql_error());
- }
- $vrn = $_POST['vrn'];
- $sql = mysql_query("SELECT * FROM Customers WHERE vrn like '%$vrn%'");
- while($row = mysql_fetch_array($sql))
- {
- echo $row['first_name'];
- echo $row['last_name'];
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement