Redirection en arrière avec header [php]

Inconnu -  
 nYTSEE -
bonjour, comment faire une redirection en php vers la page précédente ? o_0

j'essaye ça: header('Location:'?>javascript:history.back(-1)<?php ); mais ça marche pas, avez vous une réponse ?
A voir également:

4 réponses

kilian Messages postés 8854 Statut Modérateur 1 526
 
En php:
header('Location: ' . $_SERVER['HTTP_REFERER'] );
23
Antwan____
 
J'ai bien ri x)
10
christboy Messages postés 157 Statut Membre 20
 
euh mettre du javascript dans du php sa ne marche pas.
le php s'execute coter serveur et arrive transcrit au client
le javascript arrive compiler au client (tu vois la nuance?) (le client peux interagir avec)

Sinon javascript:history.back(-1); est bien la bonne syntaxe
2
livegames
 
Salut,

Moi j'ai un petit problème, cette redirection doit prendre l'internaute en avant par 2 pages, comment faire svp!!!
0
nYTSEE
 
sert toi de chiffre entre les parenthèses pour reculer de plus d'une page en arrière javascript:history.back(-1);
0