couldnt get php header to redirect so used javascript