[eluser]PhilTem[/eluser]
You'd handle it the way you'd handle it in pure PHP. Did you already try something? Have some code or google'd your question? At least some of us - myself included - don't want to do your work. So please, tell us something about your first attempts.