rasshatay, Выше вроде написано![]()
Код (+/-)
$act = filter_input(INPUT_POST, 'button', FILTER_DEFAULT);
if ($act && $act== 'page1') {
echo '<p>You are on page: ' . $act;
}else
if ($act && $act == 'page2') {
echo '<p>You are on page: ' . $act;
}else
if ($act && $act == 'page3') {
echo '<p>You are on page: ' . $act;
}else {
echo '<form action="?' . uniqid() . '" method="post">' // uniqid() твой генератор ссылки
.'<p style="margin:0;"><input style="font-size: 0px;background-image: url(home.png);width:100px;height:100px;" type="submit" name="button" value="home">'
.'<input style="font-size: 0px;background-image: url(page1.png);width:100px;height:100px;" type="submit" name="button" value="page1"></p>'
.'<p style="margin:0;"><input style="font-size: 0px;background-image: url(page2.png);width:100px;height:100px;" type="submit" name="button" value="page2">'
.'<input style="font-size: 0px;background-image: url(page3.png);width:100px;height:100px;" type="submit" name="button" value="page3"></p>'
.'</form>';
echo '<p>Home page: ' . $act;
}