i'm working on a site where there is select tag
<form name="frmSel" method="POST">
<label><strong style="color:#0084D0;font-size:15px;font- weight:bold;">Centers : </strong> </label>
<select name="centers">
<option value="">Select</option>
<option value="index-page-1">index page1</option>
<option value="index-page-2">index page2</option>
</select>
</form>
what i want is after selecting any option it should go on respective page through php sessions and respective value should be stored in that session.
there are inner pages which are same for both index pages.
but there is some data which should change after selecting any option on main index page.
i was trying to use if condition in session but it doesn't worked.
<?php
session_start();
$center=$_POST['centers'];
$flag=0;
if(session_name($center)== "index-page-1")
{
session_register('index-page-1');
}
else
{
$flag=1;
}
?>
and then in inner page(its sample)
<?
if($flag==0)
{?>
<p> some text1 </p>
<?
}
else
{?>
<p> some text2 </p>
<?}?>
plz help me!