title: CodeIgniter - Present view depending upon screen size
body: <p>I'm building a responsive site with the CodeIgniter framework and I have encountered a problem that I hope someone can help with.</p>
  
  <p>The site itself is essentially a means to search through a large database of information and present the results nicely formatted in a table.</p>
  
  <p>Because of the lack of screen real estate on a mobile phone the search terms and results will be reduced on these devices to only 3 out of the 20+ that will be available on a full desktop browser, meaning there will only be three fields in the database that will be searched on and presented back to the user on these smaller devices.</p>
  
  <p>Anyway, I know how to style the pages responsively using media queries, but is there a way to actually build the content of the search forms depending upon the device's screen size?</p>
  
  <p>For example I see it working a bit like so:</p>
  
  <ol>
  <li>User navigates to search page</li>
  <li>Page detects they're on a mobile phone</li>
  <li>Page's search entry form is built with only 3 fields</li>
  </ol>
  
  <p>or if they're on a desktop browser:</p>
  
  <ol>
  <li>User navigates to search page</li>
  <li>Page detects they're on a desktop browser</li>
  <li>Page's search entry form is built with the full 20+ fields</li>
  </ol>
  
  <p>I hope this makes some sense.
  "What about tablets?" you might ask, well they'll be catered for too, but it's yet to be decided how many search fields they'll be presented with.</p>
  
  <p>All ideas and advice is gratefully received.
  Tony.</p>