added some JavaScript and php snippets