Advertisement
noam76

update_tenant ChatGpt

May 10th, 2023 (edited)
689
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 3.88 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4.     <meta charset="UTF-8">
  5.     <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6.     <title>הוספת דייר חדש</title>
  7.     <link rel="stylesheet" type="text/css" href="style.css">
  8.     <script type="text/javascript" src="js/jquery-3.6.0.min.js"></script>
  9.     <script type="text/javascript" src="js/jquery.validate.min.js"></script>
  10.     <script type="text/javascript">
  11.         $(document).ready(function() {
  12.             $("#formLeft .input-bg").hover(function() {
  13.                 $(this).addClass("active");
  14.             }, function() {
  15.                 $(this).removeClass("active");
  16.             });
  17.  
  18.             $("#formLeft input").focus(function() {
  19.                 $(this).parent().addClass("active");
  20.             });
  21.             $("#formLeft input").blur(function() {
  22.                 $(this).parent().removeClass("active");
  23.             });
  24.  
  25.             $("#formRight .input-bg").hover(function() {
  26.                 $(this).addClass("active");
  27.             }, function() {
  28.                 $(this).removeClass("active");
  29.             });
  30.  
  31.             $("#formRight input").focus(function() {
  32.                 $(this).parent().addClass("active");
  33.             });
  34.             $("#formRight input").blur(function() {
  35.                 $(this).parent().removeClass("active");
  36.             });
  37.  
  38.             $("#formRight .message-bg").hover(function() {
  39.                 $(this).addClass("active");
  40.             }, function() {
  41.                 $(this).removeClass("active");
  42.             });
  43.  
  44.             $("#formRight textarea").focus(function() {
  45.                 $(this).parent().addClass("active");
  46.             });
  47.             $("#formRight textarea").blur(function() {
  48.                 $(this).parent().removeClass("active");
  49.             });
  50.  
  51.             $("#commentForm").validate();
  52.         });
  53.     </script>
  54. </head>
  55. <body>
  56.     <div>
  57.         <h1>עדכון פרטים דייר קיים<button class="learn-more" onclick="window.location.href='/vaadbait/ContactForm/index.html';">דף הבית</button></h1>
  58.     </div>
  59.     <div id="page-wrap">
  60.         <form method="post" autocomplete="off" action="updatetenant.php" id="commentForm">
  61.             <fieldset>
  62.                 <div id="formRight">
  63.                     <label for="nbrselect">:מספר דירה</label>
  64.                     <?php
  65.                     $servername = "localhost";
  66.                     $username = "root";
  67.                     $password = "";
  68.                     $dbname = "vaadbait";
  69.                     $pdo = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);
  70.                     $sql = "SELECT appartnmb,firstname,lastname FROM contacts";
  71.                     $stmt = $pdo->prepare($sql);
  72.                     $stmt->execute();
  73.                     $results = $stmt->fetchAll(PDO::FETCH_ASSOC);
  74.                     if ($stmt->rowCount() > 0) { ?>
  75.                         <select class="input-bg" name="nbrselect">
  76.                             <option value="" disabled selected>בחר דייר</option>
  77.                             <?php foreach ($results as $row) { ?>
  78.                                 <option value="<?php echo $row['appartnmb']; ?>"><?php echo $row['appartnmb'];
  79. } ?>
  80. </select>
  81. <?php } else { ?>
  82. <p>לא נמצאו דירות תואמות למספר המבוקש</p>
  83. <?php } ?>
  84. </div>
  85. <div class="input-wrapper">
  86. <label for="name">שם מלא</label>
  87. <input class="input-bg" type="text" id="name" name="name" required>
  88. </div>
  89. <div class="input-wrapper">
  90. <label for="phone">מספר טלפון</label>
  91. <input class="input-bg" type="tel" id="phone" name="phone" pattern="[0-9]{3}-[0-9]{7}" required>
  92. </div>
  93. <div class="input-wrapper">
  94. <label for="email">כתובת אימייל</label>
  95. <input class="input-bg" type="email" id="email" name="email" required>
  96. </div>
  97. <div class="input-wrapper">
  98. <label for="subject">נושא הפנייה</label>
  99. <select class="input-bg" name="subject" required>
  100. <option value="" disabled selected>בחר נושא הפנייה</option>
  101. <option value="דיווח על תקלה">דיווח על תקלה</option>
  102. <option value="בקשת שירות">בקשת שירות</option>
  103. <option value="שאר פניות">שאר פניות</option>
  104. </select>
  105. </div>
  106. <div class="input-wrapper">
  107. <label for="message">הודעה</label>
  108. <textarea class="input-bg" id="message" name="message" rows="5" required></textarea>
  109. </div>
  110. <div class="input-wrapper">
  111. <button class="btn primary-btn" type="submit">שליחה</button>
  112. </div>
  113. </form>
  114. </div>
  115. </div>
  116.  
  117. </body>
  118. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement