diff --git a/htdocs/contact/index.php b/htdocs/contact/index.php index d54c5a56c40..1c5f75f3540 100644 --- a/htdocs/contact/index.php +++ b/htdocs/contact/index.php @@ -73,9 +73,9 @@ if (strlen($_GET["userid"])) // statut commercial $sql .= " WHERE p.fk_user=".$_GET["userid"]; } -if (strlen($begin)) // filtre sur la premiere lettre du nom +if (strlen($_GET["begin"])) // filtre sur la premiere lettre du nom { - $sql .= " AND upper(p.name) like '$begin%'"; + $sql .= " WHERE upper(p.name) like '".$_GET["begin"]."%'"; } if ($contactname) // acces a partir du module de recherche @@ -106,7 +106,25 @@ if ($result) $num = $db->num_rows(); $i = 0; - print_barre_liste($titre ,$page, $PHP_SELF, '&view='.$_GET["view"].'&userid='.$_GET["userid"], $sortfield, $sortorder,'',$num); + print_barre_liste($titre ,$page, $PHP_SELF, '&begin='.$_GET["begin"].'&view='.$_GET["view"].'&userid='.$_GET["userid"], $sortfield, $sortorder,'',$num); + + print "