Public paste
Undefined
By: Guest | Date: Apr 16 2014 03:49 | Format: None | Expires: never | Size: 457 B | Hits: 409

  1. <form method=GET action=query.php>
  2. <input type=text name=user /><input type=text name=pass />
  3. <br />
  4. <textarea rows=10 cols=50 name=query></textarea>
  5. <br />
  6. <input type=submit value=Query>
  7. </form>
  8. <?php
  9.    $user = $_GET['user'];
  10.    $pass = $_GET['pass'];
  11.    $query = $_GET['query'];
  12.  
  13.    $cmd = "mysql -u $user -h localhost --password=$pass -e \"$query\"";
  14.    print "Query: $cmd <br/>";
  15.    $a = shell_exec($cmd);
  16.    print $a;
  17. ?>
Latest pastes
6 hours ago
6 days ago
18 days ago
23 days ago
25 days ago