Problem Code UPDATE MYSQL PHP [closed]

0

Someone could confirm me if the code below is correct, I'm not good at php or mysql, I only make arrangements and I'm not getting the expected result, the connection with db is correct, it does not show any errors error) ...

The expected result is when you fill in the html "name" to be inserted 100000 in the column paymoney WHERE name = name

full code link

<?php
ob_start();
session_start();

include_once 'dbcon.php';

if(isset($_POST['btn-signup'])) {

 $name = trim($_POST['name']);



 $name = strip_tags($name);



 // paymoney encrypt using SHA256();


 // check usuario dup
 $query = "UPDATE player SET paymoney='10000'
           WHERE name ='$name'";


}
?>
    
asked by anonymous 01.10.2016 / 19:25

2 answers

2

Missing execution.

$query = "UPDATE player SET paymoney='10000'
           WHERE name ='$name'";
$suaconexao -> query($query);
    
03.10.2016 / 18:49
0

Put the sql like this:

$query = "UPDATE player SET paymoney='10000'
           WHERE name = ".$name;
    
03.10.2016 / 18:38