Bon voila le code que j'ai fait quand j'entre dans ce lien il n'affiche aucun nom et prenom ect..
et plein d'erreur , donc si vous pouviez m'aider c urgent svp. voila le code:

<?php
session_start();
if($_SESSION['user']){
}
else{
header("location:index.php");
}
$user = $_SESSION['user'];

$Connection = mysqli_connect('localhost','root','','doctorant_lmd');

if (!$Connection) {
die('conection failed');
}


if (isset($_GET['num'])) {

$num_id = $_GET['num'];


}


$query = "SELECT * FROM doctorant WHERE num_doc = $num_id" ;

$slect_doc_by_num = mysqli_query($Connection,$query);


while($row = mysqli_fetch_assoc($slect_doc_by_num)) {

$num_doc = $row["num_doc"];
$nom_doc= $row["nom_doc"] ;
$prenom_doc = $row["prenom_doc"];
$class_doc = $row["class_doc"] ;
$spec= $row["spec_doc"] ;
$departement= $row["departement"];
$labo= $row["labo"] ;
$email_doc= $row["email_doc"];
$pass_doc= $row["pass_doc"];
}



if (isset($_POST['Change'])) {


$nom=$_POST['nom'];
$prenom=$_POST['prenom'];
$spec=$_POST['spec'];
$departement=$_POST['departement'];
$email=$_POST['email'];
$password=$_POST['password'];
$classement=$_POST['classement'];
$labo=$_POST['labo'];


$query = "UPDATE doctorant SET
nom_doc = '{$nom}',
prenom_doc = '{$prenom}',
spec_doc = '{$spec}',
departement = '{$departement}',
email_doc = '{$email}',
pass_doc = '{$password}',
class_doc = '{$classement}',
labo = '{$labo}'
WHERE num_doc = {$num_id} ";


$update =mysqli_query($Connection,$query);
if(!$update ) {

die("QUERY FAILED ." . mysqli_error($Connection));


}
//header("location: edit_sucess.php");

}

?>









<!DOCTYPE html>
<html lang="en">
<head>

<meta charset="utf-8">
<title></title>

<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css">
<script type="text/javascript">
function populate(s1,s2,s3){

var s1 = document.getElementById(s1);
var s2 = document.getElementById(s2);
var s3 = document.getElementById(s3);
s2.innerHTML = "";
s3.innerHTML = "";

if(s1.value == "IFA"){
var optionArray = ["|","stic|STIC","rsr|RSR"];
var Array1 = ["|","lire|LIRE"];
} else if(s1.value == "TLSI"){
var optionArray = ["|","glaa|GLAA","sia|SIA"];
var Array1 = ["|","misc|MISC"];
}
for(var option in optionArray){
var pair = optionArray Smiley option .split("|");
var newOption = document.createElement("option");
newOption.value = pair[0];
newOption.innerHTML = pair[1];
s2.options.add(newOption);
}
for(var option in Array1){
var pair1 = Array1 Smiley option .split("|");
var newOption1 = document.createElement("option");
newOption1.value = pair1[0];
newOption1.innerHTML = pair1[1];
s3.options.add(newOption1);
}

}


</script>
</head>
<body>

<div class="container">

<div class="col-xs-6">

<form method="post">

<div class="form-group">

<label for="nom">nom</label>
<input type="text" value="<?php echo $nom_doc; ?>" name="nom" placeholder="Enter your nom" class="form-control">

</div>

<div class="form-group">

<label for="prenom">prenom</label>
<input type="text" value="<?php echo $prenom_doc; ?>" name="prenom" placeholder="Enter your prenom" class="form-control">
</div>

<label class="my-1 mr-2" for="departement">Departement</label>

<select value="<?php echo $departement; ?>" class="custom-select my-1 mr-sm-2" name="departement" id="departement" onchange="populate(this.id,'spec','labo')">
<option selected>Choose...</option>
<option value="IFA">IFA</option>
<option value="TLSI">TLSI </option>
</select>
<br/>

<label value="<?php echo $spec; ?>" class="my-1 mr-2" for="spec" >Spec</label>
<select class="custom-select my-1 mr-sm-2" name="spec" id="spec">
<option selected>Choose...</option>


</select>
<br/>
<label class="my-1 mr-2" for="labo">Labo</label>
<select value="<?php echo $labo; ?>" class="custom-select my-1 mr-sm-2" name="labo" id="labo">
<option selected>Choose...</option>

</select>
<div class="form-group">

<label for="email">email</label>
<input value="<?php echo $email_doc; ?>" type="email" name="email" placeholder="Enter your email" class="form-control">
</div>
<div class="form-group">

<label for="password">password</label>
<input value="<?php echo $pass_doc; ?>" type="password" name="password" placeholder="Enter your password" class="form-control">
<div class="form-group">

<label for="classement">classement</label>
<input value="<?php echo $class_doc; ?>" max="5" min="0" type="number" name="classement" placeholder="Enter your classement" class="form-control">
</div>

<a href="edit_sucess.php"><input class="btn btn-primary" type="submit" name="Change" id="Change" value="Change" onclick="ConfirmMessage()"> </a>

<a href="viewprofil.php"><input class="btn btn-danger type="submit" name="submit" value="Annuler"></a>

</form>

</div>

</div>
<script type="text/javascript">
function ConfirmMessage() {
if (confirm("Voulez-vous Modifier Vos information ?")) {

header("location: edit_sucess.php");
}
}
</script>
<?php
$Connection->close();
?>

</body>