Advertisement
Guest User

Check.php

a guest
May 1st, 2015
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.58 KB | None | 0 0
  1. <?php
  2.  
  3. $host="127.0.0.1"; // Hostname
  4. $username="root"; // Mysql username
  5. $password=""; // Mysql password
  6. $db_name="game"; //Nome del Database
  7. $db = mysql_connect($host,$username,$password);
  8. mysql_select_db($db_name,$db);
  9.  
  10.  
  11. $id = $_POST['id'];
  12. $qp = $_POST['qp'];
  13.  
  14. $continuo = mysql_query("UPDATE accounts SET PEN = $qp WHERE ID = $id;")|| die(mysql_error());
  15. if (!$continuo) {
  16.        die ("<font color='red'>Errore.</font>" . mysql_error());
  17. }
  18.  
  19.  
  20.  
  21.  
  22. /* By tutore105 */
  23. mysql_close($db);
  24. echo "<font color='green'>Transazione avvenuta con successo.</font>" ;
  25.  
  26. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement