Guest User

Untitled

a guest
Jun 20th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. ##index.php
  2. <?php
  3.  
  4. $ninja = mysql_real_escape_string($ninja); // protect from sql injection.
  5.  
  6. require_once 'store_ninja.php'; // pretend this is a tough enough task that we'd put it in its own file
  7.  
  8. //Do other things, make pretty poniz.
  9.  
  10. ?>
  11.  
  12.  
  13. ##store_ninja.php
  14.  
  15. <?php
  16.  
  17. $query = "insert into table_ninjas (name) values '" . $ninja . "';";
  18.  
  19. mysql_query($query);
  20. ?>
Add Comment
Please, Sign In to add comment