Please fill the details of usage:
% phonenumber=Request.Form("textfield") 'If id is empty, we should use get method If phonenumber="" then phonenumber=Request.QueryString("textfield") End If Set connection = Server.CreateObject("ADODB.Connection") connection.Open("customers") SQL="SELECT ID_Customer FROM Phone WHERE Phone_Number like '"&phonenumber&"';" Set list=connection.Execute(SQL) If list.EOF then Response.Redirect("./phonenotfound.asp") End If SQL="SELECT Name,Surname,Company_Name FROM Customer WHERE ID_Customer like '"&list.Fields("ID_Customer")&"';" Set list=connection.Execute(SQL) %>