Advertisement
Guest User

Untitled

a guest
Jan 30th, 2020
126
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.84 KB | None
  1. this is my first form action in index.ctp
  2. <?php echo $this->Form->create($subscribe, ['onsubmit' => 'swal()']);?>
  3.     <input type="text" name = "email" placeholder="Enter Your Email>
  4.     <div class="action-btn rounded-buttons">
  5.         <button name = "submit" class="main-btn rounded-three">Berlangganan</button>
  6.     </div>
  7. <?= $this->Form->end() ?>
  8.  
  9. this is my second form action in index.ctp
  10. <?php echo $this->Form->create($contact, ['onsubmit' => 'swal()']);?>
  11.     <div class="form-input mt-15">
  12.         <label>Nama</label>
  13.         <div class="input-items default">
  14.             <input type="text" placeholder="Nama" name="name">
  15.             <i class="lni-user"></i>
  16.         </div>
  17.     </div> <!-- form input -->
  18.     <div class="form-input mt-15">
  19.         <label>Email</label>
  20.         <div class="input-items default">
  21.             <input type="email" placeholder="Email" name="email">
  22.             <i class="lni-envelope"></i>
  23.         </div>
  24.     </div> <!-- form input -->                            
  25.     <div class="form-input mt-15">
  26.         <label>No. Telp</label>
  27.         <div class="input-items default">
  28.             <input type="text" placeholder="No. Telp" name="phone">
  29.             <i class="lni-mobile"></i>
  30.         </div>
  31.     </div> <!-- form input -->
  32.     <div class="form-input mt-15">
  33.         <label>Pesan</label>
  34.         <div class="input-items default">
  35.             <textarea placeholder="Your Message...." name="message"></textarea>
  36.             <i class="lni-pencil-alt"></i>
  37.         </div>
  38.     </div> <!-- form input -->
  39.     <p class="form-message"></p>
  40.     <div class="form-input rounded-buttons mt-20">
  41.         <button type="submit" class="main-btn rounded-three">Send</button>
  42.     </div> <!-- form input -->
  43. <?= $this->Form->end() ?>
  44.  
  45. When the contact form button execute it also insert the email in Subscribes table
Advertisement
RAW Paste Data Copied
Advertisement