As suggested in this thread, you should be checking if the query failed and if so using mysql_error to see why. (as stated by Weed in the post YOU quoted!) Also you should build the query in a variable so you can inspect it in case it fails.
$qry = "SELECT id FROM client WHERE NomClient='$nom' ";
$ireq_nex = mysql_query($qry);
if( !$ireq_nex ) {
die(sprintf("<pre>There was an error executing the query.\nQuery was: %s\nMySQL Said: (%d) %s</pre>",$qry,mysql_errno(),mysql_error()));
}
if(mysql_num_rows($ireq_nex)>0)
{ // rest of your code
Also note, the entire mysql library has been deprecated in favor of mysqli (the i stands for improved) or PDO (PHP Data Objects). See Choosing an API for more info.
Also your query is vulnerable to an injection attack. You should never place user supplied data directly into the query string. Instead you should use an escaping function such as mysqli_real_escape_string() or sqlite_escape_string(), or, arguably more preferably, use prepared statements. See SQL Injection for more information.