Call values of drop down menu in server part


i am unable to call input$vars1 (selectInput(
inputId = "vars",label = "Dependent Variable:", choices = colnames(fdata%>%select_if(is.factor))
in UI part ) in server part. i am using column names in the drop down menu and same i want to pass in a smbinning function in server part. so that every time user select a different column, same time binning for that column created.

result <- smbinning(df = fdata,y = "def_flag",x = input$vars1,p = 0.05)