diff --git a/htdocs/socnote.php b/htdocs/socnote.php index 84d7397cbc6..879fedf4368 100644 --- a/htdocs/socnote.php +++ b/htdocs/socnote.php @@ -23,23 +23,25 @@ require("./pre.inc.php"); if ($_POST["action"] == 'add') { - $sql = "UPDATE ".MAIN_DB_PREFIX."societe SET note='$note' WHERE idp=$socid"; + $sql = "UPDATE ".MAIN_DB_PREFIX."societe SET note='".$_POST["note"]."' WHERE idp=".$_POST["socid"]; $result = $db->query($sql); + + $_GET["socid"]=$_POST["socid"]; // Pour retour sur fiche } /* * */ llxHeader(); -if ($socid > 0) { +if ($_GET["socid"] > 0) { - $societe = new Societe($db, $socid); - $societe->fetch($socid); + $societe = new Societe($db, $_GET["socid"]); + $societe->fetch($_GET["socid"]); /* * */ - $head[0][0] = DOL_URL_ROOT.'/soc.php?socid='.$_GET["socid"]; + $head[0][0] = DOL_URL_ROOT.'/soc.php?socid='.$societe->id; $head[0][1] = "Fiche société"; $h = 1; @@ -89,12 +91,13 @@ if ($socid > 0) { print_titre($societe->nom); - print "