在sign_up之后重定向到另一个页面时出现会话错误

I am trying to set value in a session variable "$_SESSION['user_id']", and it is working fine on my server side, but when I uploaded it on client's server, then it shows empty value in that variable. Here is the code:

session_start();
if(isset($_POST['submit'])):
    $select="select email from credentials where email='".$_POST['email']."'";
    $select_run=mysql_query($select) or die(mysql_error());
    $select_num=mysql_num_rows($select_run);
    if($select_num > 0):
        $nok="Email Address already exists. Please choose another.";
    else:
        $date = date("Y-m-d",strtotime($_POST['dob']));
        $name = $_POST['fname']." ".$_POST['lname'];
        $query="insert into credentials(fullname,email,pass) values('$name','".$_POST['email']."',
        '".md5($_POST['pass'])."')";
        mysql_query($query) or die(mysql_error());
        $_SESSION['user_id'] = mysql_insert_id();
        $send_mail=$db->send_mail3($_POST['email'],$name);
        $ok="You are successfully registered";
        forceRedirectAdmin("booking_code.php");
    endif; 
endif;

The problem is $_SESSION['user_id'] shows empty value when the user redirect to booking_code.php.