[REFACTOR] Removed the JavaScript alert for localhost and replaced with PHP equivalent as it was easier to style.