php - My MySQL database is not updating? -
i'm trying update datebase php archive can't: before ask: names db written correctly , if works too... <?php if(isset($_get["ans"]) && isset($_get["name"])) { include("con.php"); $con = con(); $answer = $_get["ans"]; $nam = $_get["name"]; if($answer="firefly" ||$answer="firefly" ||$answer="firefly") { $le=2; $sc=50; $update = "update user set level='$le', score='$sc' name = '$nam'"; mysql_query($update,$con); // header("location: lv1b.php?n=$nam"); } else { echo "try again..." ; } } ?>* this con.php... <?php function con() { $server="localhost"; $user="root"; $pass=""; $con= mysql_connect($server, $user,$pass); mysql_select_db("games"); return $con; } your if statement assigning values, not testing ...