basic JS + PHP/CI functionality