Advertisement
michaelyuen

Untitled

Jul 13th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.34 KB | None | 0 0
  1. configuration.php
  2.  
  3. // GLOBAL $link; <== remove this
  4. $link = mysqli_connect($DB["host"], $DB["user"], $DB["pass"],$DB['dbName']) or die(mysqli_error($link));
  5.  
  6. yourfile.php
  7.  
  8. include 'configuration.php';
  9.  
  10. function checkInput($inputText){
  11.     global $link;
  12.     $outputText=mysqli_real_escape_string($link,trim($inputText));
  13.     return $outputText;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement