sql connection and page redirecting is working fine