I am using Express.js in my project. When I submit a form, a function is executed and what I would like is that at the end of the function, it changes the page from index to results.

```
io.on('connection', function(socket){
  socket.on('query', function(qCity,qState,qLowPrice,qHighPrice, req, res){

```

I want it to redirect here:

```
  }); // end of socket.on query function
}); // end of io.on

```

I've read on some posts about using middleware but still not sure it's exactly what I want.