I'd like to use a the session id to update a specific entry in my database (as foreign key).
Session id:
$_SESSION['id'] = '1';
PDO
$sql = "UPDATE table_user set f_name = :f_name, l_name = :l_name where id = :id and fk_user = {$_SESSION['id']}";
Is this method safe for manipulation? It seems a little bit weak to me but I never worked with session ids as foreign key. Any suggestions are are very welcome. I'm sorry if this question is bad.