Advertisement
Guest User

Untitled

a guest
May 25th, 2016
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. require("../config.php");
  2.  
  3. if ($_SERVER['REQUEST_METHOD'] == "POST"){
  4. $new_Text = str_replace("'", "''", $_POST['textoHome']);
  5.  
  6. $sql = "UPDATE `site_texto-home` SET texto='$new_Text'";
  7.  
  8. if ($link->query($sql) === TRUE) {
  9. echo "<div class="alert alert-success" role="alert">Texto editado com sucesso!</div>";
  10. } else {
  11. echo "<div class="alert alert-danger" role="alert">Falha ao editar o texto: " . $link->error . "</div>";
  12. }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement