Initial Files

fixed php script, updated variable names for clarity