-1

I want to update my user_info table but it's not working. In my user_info I have already taken some values from one activity and from another activity I want to take some more values but it's not working. I'm pretty sure that there is no error in my Java code.. is there any error in my query?

$db_name = "db";
$mysql_user = "root";
$mysql_pass = "";
$server_name = "localhost";

$con = mysqli_connect($server_name, $mysql_user, $mysql_pass, $db_name);

$name = $_POST["user"];
$user_email = $_POST["user_email"];
$Gender = $_POST["Gender"];
$contact = $_POST["contact"];
$address = $_POST["address"];

$sql_query = "UPDATE user_info SET name='$name', Gender='$Gender', contact='$contact', address='$address' WHERE user_email='$user_email'";
mysqli_query($con,$sql_query)

mysqli_close($con);
David Ferenczy Rogožan
  • 23,966
  • 9
  • 79
  • 68
Bebo
  • 37
  • 1
  • 7

1 Answers1

0

Im not sure without seeing you database table but "Gender" is capitalized while the other field names are lowercase. Just a shot in the dark here, otherwise your query looks fine.

Justin Herter
  • 590
  • 4
  • 17