title: file path structures ajax and php sessions
body: <p>I am working on a projects that is kind of all over the place. My display file is index.php. From there I make calls via jquery to ajax functions which then call php file that gets and receives user data from mysql table. The php functions saves some data into php session variables, sometimes just returns data back to ajax. </p>
  
  <p>I am fairly new to ajax, php and mostly sessions and am finding i may be having trouble with the way I am making my file paths......For exaple, I have found that sometimes using the full URL file path rather than just /functions/updateUser.php can break the link!</p>
  
  <p>So my question is, how exactly does the server pass variables through php sessions?</p>
  
  <p>If my file structures are the following, can this create issues? My second question would be can file structure also affect how ajax data is returned? </p>
  
  <p>Root > index.php<br />
  Root > sessions.php<br />
  Root > functions > (php files that make calls to database)<br />
  Root > scripts > (js files that make calls to the php functions)<br /></p>
  
  <p>I have searched for tutorials that can help give me a more clear understanding (and mental picture) of how this information is passed from page to page, but have found nothing!</p>