Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.78 KB | None | 0 0
  1. <?
  2. echo '
  3. <div style="border-bottom:1px solid 000;">
  4. <form id="form1" name="form1" method="post" action="?ac=newid">
  5.  
  6.     Número para adicionar: <label for="soma"></label>
  7.    <input type="text" size="2" name="soma" id="soma" />
  8.         <br> Itens: <br>
  9.     <label for="textarea"></label>
  10.     <textarea name="itens" id="itens" cols="100" rows="20"></textarea>
  11.  
  12.         <br>
  13.  
  14.    <input type="submit" name="button" id="button" value="Update" />
  15.  
  16. </form>
  17. </div>
  18. ';
  19.  
  20. /********************CÓDIGO************************/
  21.  
  22. if($_GET['ac'] && $_GET['ac'] == 'newid'){
  23. //número pra fazer a soma ao id
  24. $soma = $_POST['soma']
  25. //campo dos itens
  26. $itens = $_POST['itens'];
  27. $itens = str_replace("<", "&lt", $itens);
  28. $itens = str_replace(">", "&gt", $itens);
  29.  
  30. echo nl2br($itens)."<br><br>";
  31.  
  32. }
  33. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement