Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <form method="POST">
- <input type="text" name="word1" placeholder="Enter Magical Word # 1"><br/>
- <input type="text" name="word2" placeholder="Enter Magical Word # 2"><br/>
- <input type="text" name="word3" placeholder="Enter Magical Word # 3"><br/><br/>
- <input type="submit" value="Submit">
- </form>
- <?php
- if(isset($_POST['submit'])) {
- $word1 = $_POST['word1'];
- $word2 = $_POST['word2'];
- $word3 = $_POST['word3'];
- $array = array($word1, $word2, $word3);
- foreach( $array as $value ){
- echo ($value == 'love' ? '12.' : '');
- echo ($value == 'respect' ? '30.' : '');
- echo ($value == 'trust' ? '2017' : '');
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement