Hi viraj intresting! i changed the code to this: $kind=$_SESSION['s3']; $query1="insert into user(kind,user,pass,name)values('$kind','$str','$str2','$str3')"; $result1=mysql_query($query1); i set the session in my another page and now it works properly:D LOL!!!!!!