remove not needed fail
switch to mysqli, look at passing in location in url