1j0e

purgesuggestions.php

May 16th, 2012
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. <?php
  2.  
  3. $userIP = $_SERVER['REMOTE_ADDR'];
  4. $con = mysql_connect( "localhost","lolerman","root" );
  5.  
  6. if ($userIP == "75.186.88.171"){
  7.  
  8. if ( !$con ){
  9.  
  10. die( 'Could not connect: ' . mysql_error() );
  11.  
  12. } else {
  13.  
  14. mysql_select_db( "lolerman_lolerstream", $con );
  15.  
  16. $query = "DELETE * FROM suggestions";
  17.  
  18. $result = mysql_query( $query,$con ) or die( 'Could not execute query: ' . mysql_error() );
  19.  
  20. }
  21.  
  22. }
  23. mysql_close($con)
  24.  
  25. ?>
Advertisement
Add Comment
Please, Sign In to add comment