<%

if Request("flag")=1 then
user_name=Request("user_name")

session("sql")="select * from user where user_name='"&user_name&"'"
elseif Request("flag")=2 then
	nickname=Request("nickname")
	session("sql")="select * from user where nickname='"&nickname&"'"
elseif Request("flag")=3 then
sql="select user.* from user,user_info where user.user_name=user_info.user_name"
	graduated_school=Request("graduated_school")
	school_date=Request("school_date")
	if graduated_school<>"" then
		sql=sql&" and user_info.graduated_school like '%"&trim(graduated_school)&"%'"
	end if
	if school_date<>"0" then
		sql=sql&" and user_info.school_date like '"&school_date&"'"
	end if
	session("sql")=sql
end if
session("sql")=session("sql")&" ORDER BY user.weight DESC , user.photo DESC"

Response.Redirect "show_search.asp?move=1"

%>
<p><%=session("sql")%></p>