SHARE
TWEET

Untitled

a guest Jul 12th, 2019 79 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. require "connection.php";
  3.  
  4. if(!$con)
  5. {
  6.     echo 'Not Connected To Server';
  7. }
  8.  
  9. if(mysqli_select_db($con,'wishes_database'))
  10. {
  11.     header('location: thankyou.html');
  12. }
  13.  
  14.  
  15. $Name = $_POST['name'];
  16. $Character = $_POST['character'];
  17. $Wishes = $_POST['wish'];
  18.  
  19. $sql = "INSERT INTO comments (Name,Favorite,Comment) VALUES ('$Name','$Character','$Wishes')";
  20.  
  21. if(mysqli_query($con,$sql))
  22. {
  23.     echo 'Not Inserted';
  24. }
  25. else
  26. {
  27.     echo 'Not Inserted Dummy';
  28. }
  29.  
  30. {
  31. String userString="a'bcd";
  32. String changedUserString = userString.replace("'","''");
  33.         //changedUserString  = a''bcd
  34. String insertTableSQL = "INSERT INTO myTable (insertColumn) VALUES("
  35.                         +" '"+changedUserString +"' )";
  36.                         }
  37. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top