Advertisement
HoneyRemedy

Untitled

Sep 11th, 2017
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.70 KB | None | 0 0
  1. <body style="background-color:cyan">
  2. <form method='get'>
  3. <table>
  4.     <tr>
  5.         <td>Enter the text:</td>
  6.         <td><input  type='text' name='name' placeholder='name' ></td>
  7.     </tr>
  8.     <tr>
  9.         <td>Times to print:</td>
  10.         <td><input type='text' name='number'></td>
  11.     </tr>                      
  12.     <tr>
  13.  
  14.         <td></td>
  15.         <td><input type='submit' value='Go'></td>
  16.     </tr>
  17. </table>
  18. </form>
  19. </body>
  20.  
  21.  
  22. <?php
  23.  
  24. if(isset($_GET['name']) AND isset($_GET['number']) )
  25. {
  26. $data = $_GET['name'];
  27. $num = $_GET['number'];
  28.  
  29.  
  30.  
  31. echo "<br>";
  32.  
  33. for($count=0;$count<$num;$count=$count+1)
  34.     {
  35.     if($count%2)
  36.     echo "<span style='background-color:yellow;color:red'>".$data."</span> \n <br>";
  37.     else
  38.     echo $data."\n <br>";
  39.     }
  40. }
  41. else
  42. exit;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement