Bu sayfaya erişim nasıl? Yani form direk bu sayfaya mı gidiyor? Eğer öyleyse sayfanın en üstüne ob_start() ve en altına da ob_end_flush() koymanız yeterli olur. Ancak eğer bu dosya herhangi bir yerde include ediliyorsa, mesela index.php'de, en üste ob_start() ve en alta ob_end_flush() yazmanız yeterli olacaktır. Eğer hiç biri sorununuza çözüm olmuyorsa şu kodu:

header("Location: user_profile/user_details.php");
Şununla değişin:

if (!headers_sent()) {
    header('Location: user_profile/user_details.php');
    exit;
}else{
    echo '	
<script type="text/javascript">window.location="user_profile/user_details.php";</script>';
}