Hello i've actually a table to update throught php/html and have no clue why I got the error "Error" (which is my mysql_query die) I've tried if every variable in my code were send in my update.php and everything was here. So the problem come from my update.php code.
Here is my updating code:
<?php
include('config.inc.php');
$idn = $_POST["idn"];
$nom = $_POST['nom'];
$prenom = $_POST["prenom"];
$payss = $_POST["pays"];
$req = "UPDATE membres SET prenom = '$prenom' , "
." pays = '$payss' "
." nom = '$nom' , "
." where id = $idn ";
$res = mysql_query( $req ) or die ("error updating!");
?>
Thanks for your answers !
SET col = a, col2 = b, WHEREis invalid syntax, WHERE is not a column, it doesn't need a comma, also before the second column the one is needed." pays = '$payss' ", and have extra comma in this line." nom = '$nom' , "mysql_real_escape_string($input)before converting to mysqli and PDO (prepared statement) because your code is vulnerable to SQL injection attack!