<?php
require_once($_SERVER['DOCUMENT_ROOT'].'/espace_personnel/inc/head-lib.php');

$sql = dbquery("SELECT * FROM cv_competences WHERE id_cv = '".$_SESSION['user']['id_cv']."' AND id_competence_cv= '".$_GET['id_competence']."' ");

if(dbnumrows($sql)>0){
	$intitule		= dbresult($sql,0,'intitule');
	$description	= dbresult($sql,0,'description');
}
else{
	$intitule		= '';
	$description	= '';
}

if(isset($_GET['id_competence']))	$id_competence = $_GET['id_competence'];
else								$id_competence = "new";
?>

<style>
label {width:40%;}
 </style>

<form action="update_competence.php?tab=4" method="POST" class="valid_form">
	<input type="hidden" name="id_competence" value="<?php echo $id_competence;?>"/>
	<label>Intitulé : </label><input type="text" name="intitule" required="required" value="<?php echo $intitule;?>"/><br><br>
	<label>Description : </label><textarea style="width:40%;vertical-align:top;" name="description"><?php echo $description;?></textarea><br><br>
	<label></label><input class="bg-red" type="submit" value="Valider" />
</form>

