<!DOCTYPE html>
<html>
<head>
<title>E-permanence</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control " content="no-cache">
<style>
label {
display:block;
margin: 20px 0 5px 0;
}
</style>
</head>
<body>
<h1>Inscription</h1>
<form name="form" method="post" action="$valeurs ternaires.php">
<label for="nom">Nom*</label>
<input name="nom" type="text" id="nom" maxlength="20">
<label for="prenom">Prenom*</label>
<input name="prenom" type="text" id="prenom" maxlength="20">
<label for="mail">Mail*</label>
<input name="mail" type="email" id="mail" maxlength="20">
<label for="sexe">Votre sexe</label>
<input name="sexe" type="text" id="sexe">
<label for="profession">Votre profession</label>
<input name="profession" type="text" id="profession">
<p><input type="submit" value="go"></p>
</form>
</body>
</html>
<?php
$nom = isset($_POST['nom']) ? $_POST['nom'] : "";
$prenom = isset($_POST['prenom']) ? $_POST['prenom'] : "";
$mail = isset($_POST['mail']) ? $_POST['mail'] : "";
$sexe = isset($_POST['sexe']) ? $_POST['sexe'] : "";
$profession = isset($_POST['profession']) ? $_POST['profession'] : "";
// <!-- Cas 1 -->
// if ($user == "" or $prenom == "" or $mail == "") {
if(empty($nom) || empty($prenom) || empty($mail)) { ?>
<html>
<head>
<title>Avertissement</title>
</head>
<body>
<?php // header("Location:e-perm_homepprofession.php?inscription=no&prob=1"); ?>
<h1>Erreur</h1>
<p style="font-weight:bold; color:#990000;">Veuillez remplir tous les champs requis</p>
<p><a href="e-perm_register.php">Retour</a></p>
</body>
</html>
<?php
} else {
// die(var_dump($sexe));
var_dump($nom);
var_dump($prenom);
var_dump($mail);
var_dump($sexe);
var_dump($profession);
}
?>
- Output for 5.5.0 - 5.5.38, 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.30, 8.2.0 - 8.2.25, 8.3.0 - 8.3.13
- <!DOCTYPE html>
<html>
<head>
<title>E-permanence</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control " content="no-cache">
<style>
label {
display:block;
margin: 20px 0 5px 0;
}
</style>
</head>
<body>
<h1>Inscription</h1>
<form name="form" method="post" action="$valeurs ternaires.php">
<label for="nom">Nom*</label>
<input name="nom" type="text" id="nom" maxlength="20">
<label for="prenom">Prenom*</label>
<input name="prenom" type="text" id="prenom" maxlength="20">
<label for="mail">Mail*</label>
<input name="mail" type="email" id="mail" maxlength="20">
<label for="sexe">Votre sexe</label>
<input name="sexe" type="text" id="sexe">
<label for="profession">Votre profession</label>
<input name="profession" type="text" id="profession">
<p><input type="submit" value="go"></p>
</form>
</body>
</html>
<html>
<head>
<title>Avertissement</title>
</head>
<body>
<h1>Erreur</h1>
<p style="font-weight:bold; color:#990000;">Veuillez remplir tous les champs requis</p>
<p><a href="e-perm_register.php">Retour</a></p>
</body>
</html>
preferences:
94.02 ms | 412 KiB | 5 Q