Faire un "précédente" sans javascript

Faire un "précédente" sans javascript - PHP - Programmation

Marsh Posté le 01-04-2006 à 14:46:46    

Salut,
 
Voilà je cherche un moyen de mettre un lien hypertexte équivalent à "page précédente", ou équivalent à la fonction javascript Javascript:history.go(-1).
Il y a t-il un moyen simple ?

Reply

Marsh Posté le 01-04-2006 à 14:46:46   

Reply

Marsh Posté le 01-04-2006 à 14:49:12    

Récupère le referer et crée un lien dessus


Message édité par masklinn le 01-04-2006 à 14:49:55

---------------
I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box, and replicate and expand beyond their wildest dreams by throwing away the limits imposed by overbearing genetic r
Reply

Marsh Posté le 01-04-2006 à 15:58:01    

Salut,
 
<?php
header('location:'.$_SERVER['HTTP_REFERER']);
?>
 
ça peut ne pas être efficace car cette variable peut être modifiée...
 
a +

Reply

Marsh Posté le 01-04-2006 à 16:10:29    

anthomicro a écrit :

Salut,
 
<?php
header('location:'.$_SERVER['HTTP_REFERER']);
?>
 
ça peut ne pas être efficace car cette variable peut être modifiée...
 
a +


Bravo, c'est pas ce qu'il a demandé [:jar jar]


---------------
I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box, and replicate and expand beyond their wildest dreams by throwing away the limits imposed by overbearing genetic r
Reply

Marsh Posté le 01-04-2006 à 16:25:07    

lol c'est pas un header qu'il lui fait mais un lien...
Donc c'est plutot
<a href="<?php echo $_SERVER['HTTP_REFERER']; ?>">retour</a>
(pas testé)

Reply

Marsh Posté le 01-04-2006 à 16:55:06    

ah merde... désolé je suis fatigué...
 
bref oui c'est la solution de mandalor...

Reply

Marsh Posté le 01-04-2006 à 17:07:15    

mandalor a écrit :

lol c'est pas un header qu'il lui fait mais un lien...
Donc c'est plutot
<a href="<?php echo $_SERVER['HTTP_REFERER']; ?>">retour</a>
(pas testé)


ca marche merci :)

Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed