Better will be if you can see it. On my website Loloid
There is input box, where user write his username. In menu is region and there user choose his region, where he plays. When he choose his region, in form is new hidden input with your region.
I have PHP file, where i save his username with $_POST, but it doesn't work for region. Here are my codes, I have no idea how to save my region with $_POST
//.Value are classes for regions
$('.Value').click(function(e){
var value = $(e.target).text();
$('.hiddenRegion').html(value);
});
Here is HTML
<form method="post" action="lol.php" id="form">
<ul>
<li class="field">
<input class="input" type="text" autocomplete="off" placeholder="Write a summoner name" name="summonerName" id="summonerName"/>
<a id="formSubmit"><i class="icon-search"></i></a>
<input type="hidden" name="hiddenInput" class="hiddenRegion"></input>
</li>
</ul>
</form>
And PHP
$region = $_POST['hiddenInput'];
When i print $region with echo, it returns just blank string