Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- if(isset($_POST['reseta_wl'])) {
- $dbhost = '127.0.0.1';
- $dbuser = 'root';
- $dbpass = '';
- $conn = mysql_connect($dbhost, $dbuser, $dbpass);
- if(! $conn ) {
- die('Could not connect: ' . mysql_error());
- }
- $id = $_SESSION['s_usuario'];
- $sql = "UPDATE game ". "SET credito = 30 ".
- "WHERE id = $id" ;
- mysql_select_db('gbwc');
- $retval = mysql_query( $sql, $conn );
- if(! $retval ) {
- die('Could not update data: ' . mysql_error());
- }
- echo "Updated data successfullyn";
- mysql_close($conn);
- } else {
- ?>
- <form method="post" action="<?php $_PHP_SELF ?>">
- <input type="button" name="reseta_wl" value="Resetar">
- </form>
- <?
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement