Récuperer variable dans fonction php [Résolu/Fermé]
Signaler
seb911
seb911
- Messages postés
- 16
- Date d'inscription
- mercredi 28 janvier 2009
- Statut
- Membre
- Dernière intervention
- 16 octobre 2009
seb911
- Messages postés
- 16
- Date d'inscription
- mercredi 28 janvier 2009
- Statut
- Membre
- Dernière intervention
- 16 octobre 2009
2 réponses
Mimiste
- Messages postés
- 1149
- Date d'inscription
- samedi 17 mai 2008
- Statut
- Membre
- Dernière intervention
- 6 mars 2016
Salut
Ben avec un truc du genre :
function calchash($alltorrent)
{
$hash = @sha1(BEncode($array["info"]));
$hash_maj = strtoupper($hash);
echo "<input type='hidden' name='hash' value='$hash_maj'>";
return $hash_maj;
}
et tu appelle ta fonction :
$hash_maj = calchash($truc);
Ben avec un truc du genre :
function calchash($alltorrent)
{
$hash = @sha1(BEncode($array["info"]));
$hash_maj = strtoupper($hash);
echo "<input type='hidden' name='hash' value='$hash_maj'>";
return $hash_maj;
}
et tu appelle ta fonction :
$hash_maj = calchash($truc);