09-27-2017, 11:51 AM 
		
	
	
		That AJAX parser file is sort of like writing a function in php. It doesn't have access to the DB unless you exclusively grant it.  That's where the db instantiation comes in.  
It's also a good idea if you do some other checks in that parser file before updating the database. I usually do something like
//the user has a permission level of 2, 3, or 4
	
	
	
	
	
It's also a good idea if you do some other checks in that parser file before updating the database. I usually do something like
Code:
if(hasPerm([2,3,4],$user->data()->id){Code:
//your codeCode:
}else{Code:
die("You should not be here");Code:
}
