Public paste
Undefined
By: Guest | Date: Apr 16 2014 03:30 | Format: None | Expires: never | Size: 445 B | Hits: 417

  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. ?>
  17.  
Latest pastes
3 days ago
15 days ago
20 days ago
22 days ago
23 days ago