daily pastebin goal
63%
SHARE
TWEET

Untitled

a guest Jan 18th, 2019 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <form method="POST">
  2. <input type="text" name="word1" placeholder="Enter Magical Word # 1"><br/>
  3. <input type="text" name="word2" placeholder="Enter Magical Word # 2"><br/>
  4. <input type="text" name="word3" placeholder="Enter Magical Word # 3"><br/><br/>
  5. <input type="submit" value="Submit">
  6. </form>
  7. <?php
  8. if(isset($_POST['submit'])) {
  9.    
  10. $word1 = $_POST['word1'];
  11. $word2 = $_POST['word2'];
  12. $word3 = $_POST['word3'];
  13.  
  14. $array = array($word1, $word2, $word3);
  15.              
  16. foreach( $array as $value ){
  17.     echo ($value == 'love' ? '12.' : '');
  18.     echo ($value == 'respect' ? '30.' : '');
  19.     echo ($value == 'trust' ? '2017' : '');
  20. }
  21. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top