J'ai un problème avec 2 while.
$resmail = mysql_query("SELECT login_user, mdp_user, email_user
FROM user INNER JOIN user_groupe ON user_groupe.id_user_groupe=user.id_user_groupe
WHERE user.id_user_groupe='1'; ");
while($rosmail = mysql_fetch_assoc($resmail)){
$login_user= $rosmail["login_user"];
$mdp_user=$rosmail["mdp_user"];
echo $login_user;
echo $mdp_user;
while($row0 = mysql_fetch_assoc($res)){
$id_motif_reclamation=$row0["id_motif_reclamation"];
$code_client= $row0["code_client"];
$nom_motif_reclamation= $row0["nom_motif_reclamation"];
$message ='
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Action immediate</title>
<style>
body
{
margin: 10px 0 ;
padding: 0 ;
text-align: center ;
background:#FFFFF;
font: 0.8em "Trebuchet MS", helvetica, sans-serif ;
}
div#conteneur
{
width: 1000px ;
margin: 0 auto ;
text-align: left ;
border: 0px solid #0066CC;
background: #fff ;
}
h1#header
{
border: 0px solid #0066CC;
height: 100px ;
background: url(../img/header.jpg) no-repeat top ;
background-color: #41b7d4;
}
div#contenu
{
margin: 0px 0px 0 10px ;
float: left ;
display: block ;
width:770px;
border-left: 2px dashed #41b7d4;
border-bottom: 2px dashed #41b7d4;
}
div#contenu h2
{
margin: 0 10px 0 10px;
padding-left: 25px ;
line-height: 25px ;
font-size: 1.4em ;
color: #FF6600 ;
background: url(../img/bouton.jpg) no-repeat left bottom ;
border-bottom: 1px solid #41b7d4 ;
border-left: 1px solid #41b7d4 ;
}
div#contenu p
{
text-align: justify ;
text-indent: 2em ;
line-height: 1.7em ;
padding: 0 0 0 125px;
}
.important {color : red;}
</style>
</head>
<body>
<br>
<table id="visu">
<tr>
<td align=center> Réclamation du client:'.$row0["id_motif_reclamation"].'.</td><td bgcolor="#8000FF" align=center>'.$row0["nom_client"].'('.$row0["code_client"].')</td>
</tr>
<tr>
<td>Contact:'.$row0["contact_client"].'</td><td>Nom:'.$row0["nom_client"].'</td>
</tr>
<td>Téléphone:'.$row0["tel_client"].'</td><td>Fax:'.$row0["fax_client"].'</td>
</tr>
</table>
<br>
Probleme'.$row0["nom_motif_reclamation"].':
<table id="visu">
<td align=center colspan="2" bgcolor="#FF6600"> Réclamation du client:</td>
</tr>
<tr>
<td align="center" colspan="2">'.$row0["des_reclamation"].'</td></tr>
<tr><td align=center>Cause (si elle est connue):</td><td align="center">'.$row0["cause_reclamation"].'</td></tr>
<tr>
<td align=center> Code Produit:</td><td align=center>'.$row0["code_produit"].'
</td>
</tr>
<tr>
<td align=center> N° de lot:</td><td align=center>'.$row0["lot_reclamation"].'</td>
</td>
<tr>
<td align=center> date_fabrication:(Format JJ/MM/2008)</td><td align=center>
'.$row0["date_fabrication"].
'</td>
</tr>
<tr>
<td align=center> date_DLUO:(Format JJ/MM/2008)</td><td align=center>
'.$row0["date_dluo"].'</td>
</tr>
<tr>
<td align=center> equipe:</td><td align=center>'.$row0["equipe"].'</td>
</tr>
<tr>
<td align=center> N_carton:</td><td align=center'.$row0["N_carton"].'</td>
</tr>
<tr>
<td align=center> quantité:</td><td align=center>'.$row0["quantite"].'</td>
</tr>
<tr>
<td align="center" >N° Bl:</td><td align=center>'.$row0["n_bl"].'</td></tr>
<tr>
<td align="center" >N° facture:</td><td align=center>'.$row0["n_facture"].'</td></tr>
</table>
<a href="http://intranet/qualite/v0.3a/action_immediate.php?login='.$login_user.'&mdp='.$mdp_user.'&id_reclamation='.$row0["id_reclamation"].'">Cliquer ICI </a>
</body>';
}
echo $message;
$headers ='From: "Service Réclamation"<[email protected]>'."\n";
$headers .='Reply-To: [email protected]'."\n";
$headers .='Content-Type: text/html; charset="iso-8859-1"'."\n";
$headers .='Content-Transfer-Encoding: 8bit';
$Sujet = 'Réclamation '.$nom_motif_reclamation.' sur le client '.$code_client.'';
// if(mail($rosmail["email_user"], 'Sujet', $message, $headers))
// {
// echo 'Le message a été envoyé';
// }
// else
// {
// echo 'Le message n\'a pu être envoyé';
// }
}
Le probleme ce situe sur la création du lien dans le mail il garde tourjour le premier parametre login et mot de passe.Code : Tout sélectionner
<a href="http://intranet/qualite/v0.3a/action_immediate.php?login='.$login_user.'&mdp='.$mdp_user.'&id_reclamation='.$row0["id_reclamation"].'">Cliquer ICI </a>
Ou est-ce je commis mon erreur? Pourquoi, il garde en parametre le premier login&motpasse?
guigui69
***********************************
Maj je pense avoir trouvé