Syntax and php/javascript errors