Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>הוספת דייר חדש</title>
- <link rel="stylesheet" type="text/css" href="style.css">
- <script type="text/javascript" src="js/jquery-3.6.0.min.js"></script>
- <script type="text/javascript" src="js/jquery.validate.min.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() {
- $(this).parent().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() {
- $(this).parent().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() {
- $(this).parent().removeClass("active");
- });
- $("#commentForm").validate();
- });
- </script>
- </head>
- <body>
- <div>
- <h1>עדכון פרטים דייר קיים<button class="learn-more" 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="nbrselect">:מספר דירה</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) { ?>
- <option value="<?php echo $row['appartnmb']; ?>"><?php echo $row['appartnmb'];
- } ?>
- </select>
- <?php } else { ?>
- <p>לא נמצאו דירות תואמות למספר המבוקש</p>
- <?php } ?>
- </div>
- <div class="input-wrapper">
- <label for="name">שם מלא</label>
- <input class="input-bg" type="text" id="name" name="name" required>
- </div>
- <div class="input-wrapper">
- <label for="phone">מספר טלפון</label>
- <input class="input-bg" type="tel" id="phone" name="phone" pattern="[0-9]{3}-[0-9]{7}" required>
- </div>
- <div class="input-wrapper">
- <label for="email">כתובת אימייל</label>
- <input class="input-bg" type="email" id="email" name="email" required>
- </div>
- <div class="input-wrapper">
- <label for="subject">נושא הפנייה</label>
- <select class="input-bg" name="subject" required>
- <option value="" disabled selected>בחר נושא הפנייה</option>
- <option value="דיווח על תקלה">דיווח על תקלה</option>
- <option value="בקשת שירות">בקשת שירות</option>
- <option value="שאר פניות">שאר פניות</option>
- </select>
- </div>
- <div class="input-wrapper">
- <label for="message">הודעה</label>
- <textarea class="input-bg" id="message" name="message" rows="5" required></textarea>
- </div>
- <div class="input-wrapper">
- <button class="btn primary-btn" type="submit">שליחה</button>
- </div>
- </form>
- </div>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement