I am trying to do a post and run some if statement. What I want to do is: 

1. check all fields are filled
2. if all fields are filled move on to next step, or else reload page
3. check if already in data base
4. add if not already in data base

```
post "/movies/new" do
  title = params[:title]
  year = params[:year]
  gross = params[:gross]
  poster = params[:poster]
  trailer = params[:trailer]

  if title && year && gross && poster && trailer
      movie = Movie.find_by(title: title, year: year, gross: gross)
    if movie
      redirect "/movies/#{movie.id}"
    else
      movie = Movie.new(title: title, year: year, gross: gross, poster: poster, trailer: trailer)
      if movie.save
        redirect "/movies/#{movie.id}"
      else
        erb :'movies/new'
      end
    end
  else
   erb :'movies/new'
  end
end

```

I don't think my if statement is correct. It works even if all my fields are not filled