php - 2 consecutive redirects with chance to go back -



php - 2 consecutive redirects with chance to go back -

i'm trying this:

page a: has button preview.

when it's pressed, user must see page c, when user hits button in page c, must go page b.

so, i've done redirect b url parameter, @ origin of b, redirects c.

the problem when go back, url has same parameter, redirect b c done again.

any ideas?

something this?

page a:

<?php session_start(); if(!isset($_session['visited'])) { echo "<a href='c.php'>to page c</a>"; $_session['visited']=1; } else { header('location: b.php'); } ?>

page b:

<?php session_start(); echo "page b"; ?>

page c:

<?php session_start(); echo "page c"; ?>

php redirect

Comments

Popular posts from this blog

Php operator `break` doesn't stop while -

ubuntu - Bash Script to Check That Files Are Being Created -

vim: Search & replace -