Site responsive

Fermé
Pseudo - 15 mai 2020 à 14:35
Tomas18 Messages postés 2 Date d'inscription vendredi 15 mai 2020 Statut Membre Dernière intervention 15 mai 2020 - 15 mai 2020 à 14:56
Bonjour c'est la première fois que je demande de l'aide donc désolé si je n'exprime pas bien...

Donc je vous explique, j'ai fait un contact form en html et dès qu'on clique sur envoyé, cela vous envoie sur une page php qui écrit toutes les informations dans le contact form...

Le problème c'est que je n'arrive pas a bien structurez la position de padding avec les informations du contact form selon la taille des l'onglet


Merci énormément de votre aide, les amis



Ps.

Voici le code php:

/*
<?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;
}


i

{
visibility : hidden;
}

.container-fluid {
padding: 0;
}
.banner {
width: 100%;
max-width: 100%;
}

.ban
{
width: 100%;
max-width: 100%;
position: relative;
}

.ban img
{
width: 100%;
max-width: 100%;
}

.inner-banner {
position: absolute;
top: 30%;
width: 100%;
text-align: center;
}


.btn-custom
{
background-color: darkblue;
color: white;
}

.inner-banner .btn-custom:hover
{
background-color: #2C3E50;
}

</style>
<body>

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

</header>


<section class="container-fluid banner">
<div class="ban">
<img src = "https://image.freepik.com/photos-gratuite/inscription-connexion-concept-mot-passe-utilisateur_53876-2188.jpg"></a>
</div>
<div class="inner-banner">
<div class="row">
<article class="col-nd-14 col-lg-12 col-xs-8 col-sn-6">
<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 "<i>$repertoireDestination</i>";
$nomDestination = "Portrait".date("YmdHis").".".$extensionFichier;

if (move_uploaded_file($_FILES["image"]["tmp_name"],
$repertoireDestination.$nomDestination)) {
echo "<i>Le fichier temporaire ".$_FILES["image"]["tmp_name"].
" a été déplacé vers .$repertoireDestination.$nomDestination</i>";
} 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>


</div>





<button id="form" onclick=window.location.href='formulaire.html' class="btn btn-custom">Revenir en arrière!</button>

</div>

</article>

</section>


</body>
</html>
  • /
A voir également:

4 réponses

Ne faites pas attention au /**/ je ne sais pas pk c'est la
0
Pierrecastor Messages postés 41466 Date d'inscription mercredi 5 novembre 2003 Statut Modérateur Dernière intervention 5 avril 2024 4 131
15 mai 2020 à 14:45
Salut,

Merci d'éditer ton message initial pour mettre le code dans les balises code correspondantes. :-)
0
Ah ok excusez-moi c'est la première fois
0
Tomas18 Messages postés 2 Date d'inscription vendredi 15 mai 2020 Statut Membre Dernière intervention 15 mai 2020
15 mai 2020 à 14:55
<?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;
}


i

{
visibility : hidden;
}

.container-fluid {
padding: 0;
}
.banner {
width: 100%;
max-width: 100%;
}

.ban
{
width: 100%;
max-width: 100%;
position: relative;
}

.ban img
{
width: 100%;
max-width: 100%;
}

.inner-banner {
position: absolute;
top: 30%;
width: 100%;
text-align: center;
}


.btn-custom
{
background-color: darkblue;
color: white;
}

.inner-banner .btn-custom:hover
{
background-color: #2C3E50;
}

</style>
<body>

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

</header>


<section class="container-fluid banner">
<div class="ban">
<img src = "https://image.freepik.com/photos-gratuite/inscription-connexion-concept-mot-passe-utilisateur_53876-2188.jpg"></a>
</div>
<div class="inner-banner">
<div class="row">
<article>
<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 "<i>$repertoireDestination</i>";
$nomDestination = "Portrait".date("YmdHis").".".$extensionFichier;

if (move_uploaded_file($_FILES["image"]["tmp_name"],
$repertoireDestination.$nomDestination)) {
echo "<i>Le fichier temporaire ".$_FILES["image"]["tmp_name"].
" a été déplacé vers .$repertoireDestination.$nomDestination</i>";
} 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>


</div>





<button id="form" onclick=window.location.href='formulaire.html' class="btn btn-custom">Revenir en arrière!</button>

</div>

</article>

</section>


</body>
</html>
0
Tomas18 Messages postés 2 Date d'inscription vendredi 15 mai 2020 Statut Membre Dernière intervention 15 mai 2020
15 mai 2020 à 14:56
excuse-moi j'ai du me connecter avec un autre compte
0