Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $server = "localhost";
- $username = "root";
- $password = "root";
- $db = "slabefore";
- $bdd = mysqli_connect($server,$username,$password,$db);
- mysqli_set_charset($bdd,"utf8");
- console.log("a");
- if($_POST) {
- mysqli_query($bdd,"update rating set up=up+1 where mes_id='$id'");
- //$query = $bdd->execute('UPDATE postslabefore SET ranking = ranking '.$_POST['value'].' WHERE id='.$_POST['id'].''); // Update number with +1 or -1
- //$rating = $bdd->getOne('SELECT ranking FROM postslabefore WHERE id='.$_POST['id'].''); // Get the new number value
- //$expire = 24*3600; // 1 day
- //setcookie('tcVotingSystem'.$_POST['id'], 'voted', time() + $expire, '/'); // Place a cookie
- console.log("a");
- //echo $value['ranking']; // Send back the new number value
- }
- ?>
Add Comment
Please, Sign In to add comment