Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!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" />
- <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1/0;">
- <title>הוספת דייר חדש</title>
- <link rel="stylesheet" type="text/css" href="style.css" />
- <script type="text/javascript" src="js/jquery-1.2.6.min.js"></script>
- <script type="text/javascript" src="js/jquery.validate.js"></script>
- <script type="text/javascript">
- $(document).ready(function(){
- $("#formLeft .input-bg").hover(function() {
- $(this).addClass("active");
- }, function() {
- $(this).removeClass("active");
- });
- $("#formLeft input").focus(function() {
- $(this).parent().addClass("active");
- });
- $("#formLeft input").blur(function() {
- $("#formLeft .input-bg").removeClass("active");
- });
- $("#formRight .input-bg").hover(function() {
- $(this).addClass("active");
- }, function() {
- $(this).removeClass("active");
- });
- $("#formRight input").focus(function() {
- $(this).parent().addClass("active");
- });
- $("#formRight input").blur(function() {
- $("#formRight .input-bg").removeClass("active");
- });
- $("#formRight .message-bg").hover(function() {
- $(this).addClass("active");
- }, function() {
- $(this).removeClass("active");
- });
- $("#formRight textarea").focus(function() {
- $(this).parent().addClass("active");
- });
- $("#formRight textarea").blur(function() {
- $("#formRight .message-bg").removeClass("active");
- });
- $("#commentForm").validate();
- });
- </script>
- </head>
- <body>
- <div><h1>עדכון פרטים דייר קיים <button class="learn-more" type="submit" onclick="window.location.href='/vaadbait/ContactForm/index.html';">דף הבית</button></h1></div>
- <div id="page-wrap">
- <form method="post" autocomplete="off" action="updatetenant.php" id="commentForm">
- <fieldset>
- <div id="formRight">
- <label for="Name">:מספר דירה</label>
- <?php
- $servername = "localhost";
- $username = "root";
- $password = "";
- $dbname = "vaadbait";
- $pdo = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);
- $sql = "SELECT appartnmb,firstname,lastname FROM contacts";
- $stmt = $pdo->prepare($sql);
- $stmt->execute();
- $results = $stmt->fetchAll(PDO::FETCH_ASSOC);
- if ($stmt->rowCount() > 0) { ?>
- <select class="input-bg" name="nbrselect">
- <option value="" disabled selected>בחר דייר</option>
- <?php foreach ($results as $row) { $appartnmbr = $row['appartnmb']; ?>
- <option value="<?php $row['appartnmb']?> <?php echo $row['appartnmb']; ?>"><?php echo $row['appartnmb']; ?> <?php echo $row['firstname']; ?> <?php echo $row['lastname']; ?></option>
- <?php } ?>
- </select>
- <?php } ?>
- <label for="Name">:שם משפחה</label>
- <?php
- $sql = "SELECT lastname, firstname FROM contacts WHERE appartnmb='$appartnmbr'";
- $stmt = $pdo->prepare($sql);
- $stmt->execute();
- $results = $stmt->fetchAll(PDO::FETCH_ASSOC);
- if ($stmt->rowCount() > 0) {
- foreach ($results as $row) { ?>
- <div class="input-bg">
- <input type="text" name="lastname" id="lastname" placeholder="שם משפחה" class="required" required="required" />
- <input type="text" name="lastname" value="<?php echo $row['lastname']?>" required>
- </div>
- <?php } ?>
- <?php } ?>
- <br>
- <input type="image" src="images/send-button.jpg" name="submit" value="Submit" class="submit-button" />
- </div>
- <div id="formLeft">
- <label for="Name">:שם פרטי</label>
- <div class="input-bg">
- <input type="text" name="firstname" id="firstname" placeholder="שם פרטי" class="required" required="required" />
- </div>
- <label for="Email">:דואר אלקטרוני</label>
- <div class="input-bg">
- <input type="text" name="mail" id="mail" placeholder="דואר אלקטרוני" <!-- class="required email -->" />
- </div>
- </div>
- <div class="clear"></div>
- </fieldset>
- </form>
- </div>
- <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
- </script>
- <script type="text/javascript">
- _uacct = "UA-68528-29";
- urchinTracker();
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement