Jump to content
php.lv forumi

SESSION


FT3

Recommended Posts

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 by FT3
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...