FT3 Posted November 19, 2010 Report Share Posted November 19, 2010 (edited) Tada lieta kad uzpiezu uz attelu nekas nemainas ?! bet ja uzlieku type "submit" viss strada, help Kas pa vainu ? <?php session_start(); if($_POST['LV']){ $_SESSION['valoda']="LV"; } elseif($_POST['RU']){ $_SESSION['valoda']="RU"; } elseif($_POST['ENG']){ $_SESSION['valoda']="ENG"; } ?> <form method="post" action=""> <input type="image" name="LV" src="lv.png" > <input type="image" name="RU" src="ru.png" > <input type="image" name="ENG" src="eng.png" > </form> <?php if ($_SESSION['valoda']>=RU) { include("lang/RU.php"); } elseif ($_SESSION['valoda']>=LV) { include("lang/LV.php"); } elseif ($_SESSION['valoda']>=ENG) { include("lang/ENG.php"); } else { include("lang/LV.php"); } ?> ir ari tads variants <button type="submit" name="LV"><IMG SRC="LV.png"></button> bet man vjg lai butu pliks attels , uzpiežot mainas sessias :) Edited November 19, 2010 by FT3 Quote Link to comment Share on other sites More sharing options...
anonīms Posted November 19, 2010 Report Share Posted November 19, 2010 nav labāka ar $_GET? if($_GET['lang'] == 'ENG' OR $_GET['lang'] == 'RU' OR $_GET['lang'] == 'LV') { $_SESSION['valoda'] = $_GET['lang']; } <a href="?lang=LV">LV</a><br /> <a href="?lang=RUS">RUS</a><br /> <a href="?lang=ENG">ENG</a> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.