FORUM D’ENTRAIDE INFORMATIQUE (FEI)
Site d’assistance et de sécurité informatique

Problème d'affichage

Règles du forum : Entraide concernant la programmation informatique en général, tous langages : recherche ou correction d'un code ou d'une fonction, aide à la réalisation d'un projet...
Pour la programmation web (HTML, CSS, PHP, MySQL...), il est conseillé de s'orienter dans le forum Webmastering.
Merci de lire et de respecter la charte générale du forum.

Répondre

Prouvez que vous êtes humain en répondant à cette question
Smileys
:D :) :-) ;) :| :( :cry: :cheers: :hourra: :mv: :lol: :mdr: :bonjour: :hello: :jap: :siffle: :bisou: :P :o :x :roll: :good: :bad: :super: :reflexion: :suspect: :? :oops: :peur: :zen: :boude: :bug:

Revue du sujet : Problème d'affichage Étendre la vue

Problème d'affichage

par Airoz » ven. 8 mai 2020 13:45
Les gas j'ai fait un contact form en php mais limage ne veut as s'afficher


<?php

$nom = filter_input(INPUT_POST, "nom");

$email = filter_input(INPUT_POST, "email");

$motdepasse = filter_input(INPUT_POST, "motdepasse");

$genre = filter_input(INPUT_POST, "genre");

$image = filter_input(INPUT_POST, "image");

?>
<!DOCTYPE html>

<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>Acceuil</title>
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="css/php.css" />
<script src="script/Index.js" type="text/javascript"></script>
<style>


header
{
text-align: center;
background-color: black;
height: 50px;
line-height: 50px;
color: white;
}


.information {
text-align: center;
height: 10px;
line-height: 30px;
}


</style>
<body>

<header class = "container-fluid">
<div class="container">
<h2>Information de la candidature </h2>

</header>


<section class ="information">




<div class="row">
<article class="col-nd-12 col-lg-12 col-xs-12 col-sn-12">
<p>
<?php

$nomOrigine = $_FILES['image']['name'];
$elementsChemin = pathinfo($nomOrigine);
$extensionFichier = $elementsChemin['extension'];
$extensionsAutorisees = array("jpeg", "jpg", "gif" ,"png");
if (!(in_array($extensionFichier, $extensionsAutorisees))) {
echo "Le fichier n'a pas l'extension attendue";
} else {
// Copie dans le repertoire du script avec un nom
// incluant l'heure a la seconde pres
$repertoireDestination = dirname(__FILE__)."/image/";
echo $repertoireDestination;
$nomDestination = "Portrait".date("YmdHis").".".$extensionFichier;

if (move_uploaded_file($_FILES["image"]["tmp_name"],
$repertoireDestination.$nomDestination)) {
echo "Le fichier temporaire ".$_FILES["image"]["tmp_name"].
" a été déplacé vers ".$repertoireDestination.$nomDestination;
} else {
echo "Le fichier n'a pas été uploadé (trop gros ?) ou ".
"Le déplacement du fichier temporaire a échoué".
" vérifiez l'existence du répertoire ".$repertoireDestination;
}
}
echo "<br>";

echo "<img src ='image'/'.$nomDestination'/>";
echo "<br>Votre Nom complet: $nom";
echo "<br>Votre Email: $email";
echo "<br>Votre Mot De Passe: $motdepasse";
echo "<br>Votre sexe: $genre";

?>
</p>
</article>

</div>

<a href = "formulaire.html">Retourner vers la page de candidature</a>

</article>


</section>


</body>
</html>

Hello, Pour compléter les réponses […]

Salut

Salut Eliot, Bienvenue sur FEI :) @+ Gabriel.

Franchement, je trouve qu’on sous-estime sou[…]

Didier

Bonjour Didier, Bienvenue sur FEI :) @+ Gabriel[…]