title: Change PHP variable via AJAX
body: <p>Hi I need set value of PHP variable to "1" if clients screen resolution is more then 1200px (I check only width) and set value of this variable to "2" if client have screen smaller then 1200px.<br>
  To check clients width of screen I use JQuery function "$( window ).outerWidth(true)". If PHP can check clients resolution then I don´t need wrote this question, but PHP not allow this and for that I search for solution of this problem.
  => How can I write script which allow change PHP variable before client load page? I mean I need AJAX, but I don´t know how used it.</p>
  
  <p>Sorry for this maybe simply question. Can someone help me?</p>