Esempio n. 1
0
function registerChild($id_resp, $nom, $prenom, $age)
{
    $co = connect_me();
    $query = "INSERT INTO enfant(id_enfant,id_responsable,nom,prenom,age) VALUES (NULL,'" . $id_resp . "','" . $nom . "','" . $prenom . "'," . $age . ")";
    if ($res = $co->query($query)) {
        $msg = "<p class='message'>L'enregistrement s'est bien passé. <a href='index.php'> Retour à l'accueil</a></p>";
        //header("Location: settings.php?query_res=".$msg."");
    } else {
        $msg = "<p class='message_error'>L'enregistrement s'est mal passé.<a href='index.php'> Retour à l'accueil</a></p>";
        //header("Location: settings.php?query_res=".$msg."");
    }
    $co->close();
}
Esempio n. 2
0
    echo "<span style='color:green;'>Connecté </span> | <span><a style='color:orange;' href='logout.php'>Sign out</a></span>";
}
?>
	</p>
		<header id="head1">Account</header>
		<div id='user_profile' >

			<?php 
echo image_generator();
?>
		</div>
		<div id='userdetails'>
		<?php 
if (isset($_SESSION['uid'])) {
    $id = $_SESSION['uid'];
    $co = connect_me();
    $query = "SELECT type_user FROM utilisateur WHERE id_user='******'";
    $res = $co->query($query);
    $type = $res->fetch_assoc();
    $utype = $type['type_user'];
    $_SESSION['type_user'] = $utype;
}
?>
			<p><strong>Username:</strong></p>
			<p><strong>Nom:</strong></p>
			<p><strong>Prénom:</strong></p>
			<p><strong>Adresse:</strong></p>
			<p><strong>Catégorie:</strong></p>
			<p><strong>Nombre d'enfants:</strong></p>

		</div>