Advertisement
nemat0da

[PHP] Add Prefix/Suffix text

Dec 10th, 2016
425
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. <form name="data" method="post">
  2. <textarea name="res7ock" cols='50' rows='12' placeholder="Input your text here"></textarea><br><br>
  3. <input style="width:30%" name="suffix" placeholder="Input your prefix"><br>
  4. <input style="width:30%" name="prefix" placeholder="Input your suffix"><br><br>
  5. <input type="submit" name='res' value="GASCOK!!">
  6. </form>
  7. </center>
  8. <?php
  9. $suf =$_POST['suffix'];
  10. $pre =$_POST['prefix'];
  11. $url =$_POST['res7ock'];
  12. $gas =$_POST['res'];
  13.  
  14. if($gas){
  15. $e=explode("\r\n",$url);
  16. echo"<center><textarea cols='50' rows='12'>";
  17. foreach($e as $urls){
  18. echo ($suf).($urls).($pre).("\n");
  19. }
  20. }
  21. echo" </textarea>";
  22. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement