1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
<SCRIPT language="Javascript">
function suppcategorie(num)
{
<!--
<?php
$req1="SELECT categorieFP_FR,categorieFP_UK
FROM categorie_fp
WHERE idCategorieFP='"?>num<?php"\"";
$result1=mysql_query($req1) or die ('Erreur SQL !<br>'.$req1.'<br>'.mysql_error());
while($tmp = mysql_fetch_array($result1)) :
$nom_FR = htmlentities(stripslashes($tmp['categorieFP_FR']));
$nom_UK = htmlentities(stripslashes($tmp['categorieFP_UK']));
endwhile; ?>
if (confirm ('Êtes-vous sûr(e) de vouloir supprimer la catégorie "<?php echo $nom_FR ?>" ?'))
{
<?php
$req="DELETE FROM categorie_fp
WHERE idCategorieFP='"?>num<?php"'\"";
$result=mysql_query($req) or die ('Erreur SQL !<br>'.$req.'<br>'.mysql_error());
?>
alert ('La suppression a bien été effectuée !');
document.location.href="<?php echo $_SERVER['PHP_SELF']; ?>";
}
// -->
}
</SCRIPT> |
Partager