Problème avec p_inscription.php

Bonjour chers tous,

Je reprenais le tutoriel php inscription dénommé "Tuto PHP #1.1 - Formulaire d'inscription (avancé)".

Mais je me suis rendu compte qu'il me manque les fichiers à inclus.

Voici les la liste de ses fichiers :

  • include('function/domaine.php');
  • include('function/guid.php');
  • include('function/password.php');
  • include('function/date.php');

Quand j'ai finis le tuto et que j'exécute le code je me suis rendu compte que ces fichiers pré-cités manquent et empêchent l'affichage du formulaire d'inscription afin que j'exécute le code comment vais-je faire svp? Aidez moi à avoir ces fichiers includes pour la bonne marche de mon code merci d'avance.
Par swizzbeat05 le 13 May 2018
Cette pub permet au site de vivre ...

6 Commentaires

Tu veux participer ?
Alors connecte toi ou inscris toi et viens participer !
swizzbeat05
Le 29 May 2018
Bonsoir Monsieur Clouder,
Infiniment merci à vous pour vos aides. Que Dieu vous le rende au centuple. Vous êtes très gentil. Soyez beni pour toujours. Je fais les tests comme indiquer et je vous reviens pour vous dire ce qui est en ai de mes exécutions de code. Bonne nuit à vous sous la protection Divine.
Clouder
Le 27 May 2018
Bonjour swizzbeat05,

Pour les fichiers JQuery, je t'invite à les télécharger sur le site de JQuery. De là tu ajoutes les fichiers qui finissent par .css dans le dossier css et les fichiers qui finissent par .js dans le dossier js. N'oublie pas de les renommer si besoin.

Pour les fichiers Bootstrap, je t'invite à les télécharger sur le site de Bootstrap. De là tu ajoutes les fichiers qui finissent par .css dans le dossier css et les fichiers qui finissent par .js dans le dossier js. N'oublie pas de les renommer si besoin.

Pour le fichier style.css, celui-ci je te le donne :

Page : style.css

html {
height: 100%;
box-sizing: border-box;
}
*,
*:before,
*:after {
box-sizing: inherit;
}
body {
margin: 0;
background: #FAFAFA;
position: relative;
padding-bottom: 10rem;
min-height: 100%;
}
a, a:hover, a:active, a:focus, a:before, a:after {
outline: none;
}
input[type=text], input[type=password], input[type=email] {
width: 100%;
outline: none;
padding: 10px 10px;
margin: 8px 0;
display: inline-block;
border: 1px solid #ccc;
box-sizing: border-box;
}
select{
cursor: pointer;
-webkit-appearance: none;
-moz-appearance: none;
display: block;
width: 100%;
outline: none;
padding: 10px 10px;
margin: 8px 0;
background: white;
border-radius: 0;
border: 1px solid #ccc;
box-sizing: border-box;
}
.overlay {
height: 0%;
width: 100%;
position: fixed;
z-index: 1;
top: 0;
left: 0;
background-color: black;
overflow-y: hidden;
transition: 0.5s;
}
.overlay-content {
position: relative;
top: 25%;
width: 100%;
text-align: center;
margin-top: 30px;
}
.overlay a {
padding: 8px;
font-weight: 100;
text-decoration: none;
font-size: 36px;
color: #818181;
display: block;
transition: 0.3s;
}
.overlay a:hover, .overlay a:focus {
color: #f1f1f1;
}
.overlay .closebtn {
position: absolute;
top: -30px;
left: 0;
font-weight: 100;
font-size: 60px;
}
@media screen and (max-height: 450px) {
.overlay a {font-size: 20px}
.overlay .closebtn {
font-size: 40px;
top: 15px;
right: 35px;
}
}
.ins_cadre{
border-radius: 15px;
box-shadow: 0 2px 30px rgba(0, 0, 0, 0.15);
padding: 10px;
background: white;
}
.logbtn{
margin: 15px 0 5px 0;
outline: none;
border: 2px solid #22313F;
background: #22313F;
color: white;
border-radius: 20px;
padding: 5px 20px;
transition: all .5s ease-out
}
.logbtn:hover{
background: white;
color: #22313F;
}
.alert{
width: 100%;
position: absolute;
top: 0;
z-index: 99999;
border-radius: 0;
animation-name: slidedown_alert;
animation-timing-function: ease;
animation-duration: 0.5s;
}
@keyframes slidedown_alert{
0% {padding: 0 15px;}
100%{padding: 15px 15px;}
}
.alert-info {
color: #0096E6;
background-color: rgba(255, 255, 255, .95);
border: 0;
border-bottom: 1px solid #0096E6;
}
.alert-success {
color: #A0C83C;
background-color: rgba(255, 255, 255, .95);
border: 0;
border-bottom: 1px solid #A0C83C;
}
.alert-danger {
color: #E64C3C;
background-color: rgba(255, 255, 255, .95);
border: 0;
border-bottom: 1px solid #E64C3C;
}
.alert-warning {
color: #F39600;
background-color: rgba(255, 255, 255, .95);
border: 0;
border-bottom: 1px solid #F39600;
}
.closef{
position: absolute;
right: 25px;
outline: none;
top: 12px;
color: ;
font-size: 20px;
opacity: 1;
text-shadow: none;
transition: all 0.5s ease-out;
cursor:pointer;
}
.alert-info .closef{
color: #0096E6;
}
.alert-success .closef{
color: #A0C83C;
}
.alert-danger .closef{
color: #E64C3C;
}
.alert-warning .closef{
color: #F39600;
}
.closef:hover{
color: black;
outline: none;
text-decoration: none;
}
.lign1 > .search-pro{
position: absolute;
color: transparent;
top: 15px;
left: 0;
right: 0;
transition: all 0.5s ease-out;
}
.lign1:hover > .search-pro{
transition: all 1s ease-out;
transform: translateY(25px);
color: inherit;
}
.lign2 > .message-pro{
position: absolute;
color: transparent;
top: 15px;
left: 0;
right: 0;
transition: all 0.5s ease-out;
}
.lign2:hover > .message-pro{
transition: all 1s ease-out;
transform: translateY(25px);
color: inherit;
}
.lign3 > .picture-pro{
position: absolute;
color: transparent;
top: 15px;
left: 0;
right: 0;
transition: all 0.5s ease-out;
}
.lign3:hover > .picture-pro{
transition: all 1s ease-out;
transform: translateY(25px);
color: inherit;
}
.image-upload-pfe{
height: 25px;
}
.image-upload-pfe .hide-upload-pfe, .image-upload-pfe .send-upload-pfe{
display: none;
}
.image-plus-pfe{
border-radius: 100px;
transition: all 0.5s ease-out;
cursor: pointer;
display: block;
background: white url('/public/others/plus.svg') center no-repeat;
border: none;
padding: 40px
}
.image-plus-pfe:hover{
transform: rotate(720deg);
transition: all 0.5s ease-out;
}
.image-upload-pfe :invalid .send-upload-pfe{
display: none;
}
.image-upload-pfe :valid .image-plus-pfe{
left: 0;
position: absolute;
padding: 20px;
right: 0;
bottom: -40px;
}
.image-upload-pfe :valid .send-upload-pfe{
display: block;
}
.send-upload-pfe{
font-size: 26px !important;
padding: 25px;
outline: none;
transition: all 0.5s ease-out;
background: transparent;
border: 3px solid #2ecc71;
color: #2ecc71;
border-radius: 100px;
margin-top: -40px;
}
.image-upload{
height: 25px;
}
.image-upload .hide-upload, .image-upload .send-upload{
display: none;
}
.image-plus{
color: black;
border: 1px solid;
border-radius: 100px;
padding: 5px;
width: 25px;
height: 25px;
transition: all 0.5s ease-out;
cursor: pointer;
display: block
}
.image-plus:hover{
transform: rotate(720deg);
transition: all 0.5s ease-out;
}
.image-upload :invalid .send-upload{
display: none;
}
.image-upload :valid .send-upload{
display: block;
}
.send-upload{
width: 25px;
height: 25px;
outline: none;
padding-left: 5.5px;
transition: all 0.5s ease-out;
background: transparent;
border: 1px solid #2ecc71;
color: #2ecc71;
border-radius: 100px;
margin-left: 10px;
}
.trash-avatar{
outline: none;
background: transparent;
color: #CCC;
border: none;
font-size: 16px;
}
.btn-send-upload{
float: right;
margin-top: 10px;
padding: 5px 10px;
outline: none;
color: #666;
background: transparent;
border: 1px solid #CCC;
}
.sz-image{
width: 100px;
border-radius: 100px
}
.mask-upload-av{
display: block;
position: absolute;
top: 0px;
left: 0;
right: 0;
background: rgba(0, 0, 0, 0.4);
width: 100px;
height: 100px;
border-radius: 100px;
margin: 0 auto;
}
footer {
position: absolute;
right: 0;
bottom: 0;
left: 0;
padding: 2rem;
background: #F3F3F3;
text-align: center;
}
.social-cust {
border: 1px solid #bbb;
border-radius: 50%;
color: #bbb;
font-size: 24px !important;
padding: 10px;
margin: 0 10px;
width: 48px;
transition: all 0.5s ease-out;
}
.social-cust:hover, .social-cust:focus {
background: white;
color: #22313F;
}
.switch {
position: relative;
display: inline-block;
width: 60px;
height: 34px;
}
.switch input {display:none;}
.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #ccc;
-webkit-transition: .4s;
transition: .4s;
}
.slider:before {
position: absolute;
content: "";
height: 26px;
width: 26px;
left: 4px;
bottom: 4px;
background-color: white;
-webkit-transition: .4s;
transition: .4s;
}
input:checked + .slider {
background-color: #2196F3;
}
input:focus + .slider {
box-shadow: 0 0 1px #2196F3;
}
input:checked + .slider:before {
-webkit-transform: translateX(26px);
-ms-transform: translateX(26px);
transform: translateX(26px);
}
.slider.round {
border-radius: 34px;
}
.slider.round:before {
border-radius: 50%;
}
.switch-sex {
position: relative;
display: inline-block;
width: 120px;
height: 34px;
}
.switch-sex input {display:none;}
.slider-sex {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #2196F3;
-webkit-transition: .4s;
transition: .4s;
}
.slider-sex:before {
position: absolute;
content: "";
height: 26px;
width: 26px;
left: 4px;
bottom: 4px;
background-color: white;
-webkit-transition: .4s;
transition: .4s;
}
input:checked + .slider-sex {
background-color: #D2527F;
}
input:focus + .slider-sex {
box-shadow: 0 0 1px #D2527F;
}
input:checked + .slider-sex:before {
-webkit-transform: translateX(86px);
-ms-transform: translateX(86px);
transform: translateX(86px);
}
/* Rounded sliders */
.slider-sex.round {
border-radius: 34px;
}
.slider-sex.round:before {
border-radius: 50%;
}
.fa-size{
font-size: 28px !important;
margin: 0 10px;
color: transparent;
-webkit-background-clip: text;
background-clip: text;
background-image: linear-gradient(to right, #e74c3c,#f39c12);
}
.msg{
height: 26px;
width: 90%;
resize: none;
border: none;
max-width: 90%;
padding-left: 10px;
background: 0 0;
font-size: 16px;
outline: 0
}
.bar1{
display: block;
width: 22px;
height: 2px;
border-radius: 1px;
transition: all 0.5s ease-out;
}
.bar2{
display: block;
width: 22px;
height: 2px;
border-radius: 1px;
transition: all 0.5s ease-out;
}
.bar3{
display: block;
width: 22px;
height: 2px;
border-radius: 1px;
transition: all 0.5s ease-out;
}
.change .bar1 {
-webkit-transform: rotate(-45deg) translate(-4px, 4px);
transform: rotate(-45deg) translate(-4px, 4px);
}
.change .bar2 {opacity: 0;}
.change .bar3 {
-webkit-transform: rotate(45deg) translate(-5px, -5px);
transform: rotate(45deg) translate(-5px, -5px);
}
.navbar-btn-default{
background: #22313F;
outline: none;
color: white;
margin-right: 15px;
border: 1px solid white;
border-radius: 20px;
white-space: nowrap;
padding: 5px 12px;
transition: all 1s ease-out;
}
.navbar-btn-default:hover{
transition: all 0.5s ease-out;
color: rgba(0, 0, 0, .8);
background: white;
}
.navbar {
border: none;
}
.form-menu {
outline: none;
color: rgba(0, 0, 0, .8);;
background: transparent;
height: 34px;
border: 1px solid rgba(0, 0, 0, .8); !important;
border-radius: 5px;
transition: all 0.5s ease-out;
}
.form-menu::placeholder{
color: rgba(0, 0, 0, .8);;
}
.navbar-form {
margin-top: 0;
margin-bottom: 0;
margin-right: 0;
margin-left: 0;
border-top: none;
box-shadow: none;
-webkit-box-shadow: none;
}
.navbar-default {
background-color: white;
box-shadow: 0 0 15px rgba(0, 0, 0, .063);
border-color: transparent;
border-bottom: white;
}
.navbar-default .navbar-brand {
color: black;
}
.navbar-default .navbar-brand:hover,
.navbar-default .navbar-brand:focus {
color: #666;
}
.navbar-default .navbar-text {
color: #ffffff;
}
.navbar-default .navbar-nav > li > a {
color: black;
}
.navbar-default .navbar-nav > li > a:hover,
.navbar-default .navbar-nav > li > a:focus {
color: #666;
}
.navbar-default .navbar-nav > .active > a,
.navbar-default .navbar-nav > .active > a:hover,
.navbar-default .navbar-nav > .active > a:focus {
color: #dddddd;
background-color: rgba(0, 0, 0, .8);
}
.navbar-default .navbar-toggle {
z-index: 99;
position: absolute;
border-color: white;
float: inherit;
border: none;
}
.navbar-default .navbar-toggle:hover,
.navbar-default .navbar-toggle:focus {
background-color: transparent;
}
.navbar-default .navbar-toggle .icon-bar {
background-color: white;
}
.navbar-default .navbar-collapse,
.navbar-default .navbar-form {
border-color: rgba(0, 0, 0, .8);;
}
.navbar-default .navbar-link {
color: #ffffff;
}
.navbar-default .navbar-link:hover {
color: #dddddd;
}
@media (max-width: 767px) {
.navbar-default .navbar-brand {
position: absolute;
margin: auto 50%;
transform: translateX(-50%);
}
.navbar-btn-default {
border: none;
padding: 0 10px;
}
.navbar-btn-default:hover, .navbar-btn-default:focus {
background: inherit;
color: white;
}
.navbar-default .navbar-nav .open .dropdown-menu > li > a {
color: #ffffff;
}
.navbar-default .navbar-nav .open .dropdown-menu > li > a:hover,
.navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {
color: #dddddd;
}
.navbar-default .navbar-nav .open .dropdown-menu > .active > a,
.navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover,
.navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus {
color: #dddddd;
background-color: rgba(0, 0, 0, .8);;
}
}
swizzbeat05
Le 21 May 2018
Bonjour Monsieur Clouder,
Je tiens à vous remercier infiniment pour m'avoir envoyé les fichiers manquants. Que Dieu vous le rende au centuple et vous comble de tout de vos attentes. après l'insertion des fichiers je me suis rendu compte que les bugs ont disparu ce qui était normal. Mais l'affichage n'était du tout pas bon pour mes tests du faite qu'il manquais le dossier css. Une fois encore je vous pris de me dépanner. Merci d'avance... Que les bénédictions soient..
Voici un extrait de mon header :

<base href="<?= URL ?>"/>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Inscription</title>
<link href="<?= URL ?>css/jquery-ui.theme.min.css" rel="stylesheet" type="text/css"/>
<link href="<?= URL ?>css/jquery-ui.structure.min.css" rel="stylesheet" type="text/css"/>
<link href="<?= URL ?>css/jquery-ui.min.css" rel="stylesheet" type="text/css"/>
<link href="<?= URL ?>css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
<link href="<?= URL ?>css/style.css" rel="stylesheet" type="text/css"/>
<link href="" rel="stylesheet" href="https://cdnj.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"/>
Clouder
Le 20 May 2018
Pour les fichiers qu'il te manque :

Page guid.php

<?php
class Guid {

public function __construct(){}

public function guid(){

if (function_exists('com_create_guid') === true)
return trim(com_create_guid(), '{}');

$data = openssl_random_pseudo_bytes(16);
$data[6] = chr(ord($data[6]) & 0x0f | 0x40); // set version to 0100
$data[8] = chr(ord($data[8]) & 0x3f | 0x80); // set bits 6-7 to 10
//return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($data), 4)); Format GUID with "-"
return vsprintf('%s%s%s%s%s%s%s%s', str_split(bin2hex($data), 4));
}

public function check_guid(){

$b_guid = false;
$DB = new connexionDB(); // Do a new connection with the DB

while ($b_guid == false):

$unique_guid = Guid::guid();

$req_guid = $DB->query("SELECT guid FROM utilisateur WHERE guid = :guid",
array('guid' => $unique_guid));

$req_guid = $req_guid->fetch();

if ($req_guid['guid'] == ""){
$b_guid = true;
}

endwhile;

return $unique_guid;
}
}

Page domaine.php

<?php 
class Domain {

private $_url = "";
private $_domain = "";

public function __construct(){}

public function domain(){

$this->_url = $_SERVER['HTTP_HOST'];
$this->_domain = "http://" . $this->_url . "/";

return $this->_domain;
}
}

Page password.php

<?php
class Password {

public function __construct(){}

public function password($p_chaine){
$p_chaine = crypt($p_chaine, '$6$rounds=5000$u8dDZ8Di0AZD98zjkdaUDZIDA99A9DJ98DAZkzdc89AZDJK=$');
return $p_chaine;
}

public function age($date_naissance){
$arr1 = explode('-', $date_naissance);
$arr2 = explode('-', date('Y-m-d'));

if(($arr1[1] < $arr2[1]) || (($arr1[1] == $arr2[1]) && ($arr1[2] <= $arr2[2])))
return $arr2[0] - $arr1[0];

return $arr2[0] - $arr1[0] - 1;
}

function encrypt($data) {
$key = "secret"; // Clé de 8 caractères max
$data = serialize($data);
$td = mcrypt_module_open(MCRYPT_DES,"",MCRYPT_MODE_ECB,"");
$iv = mcrypt_create_iv(mcrypt_enc_get_iv_size($td), MCRYPT_RAND);
mcrypt_generic_init($td,$key,$iv);
$data = base64_encode(mcrypt_generic($td, '!'.$data));
mcrypt_generic_deinit($td);
return $data;
}

function decrypt($data) {
$key = "secret";
$td = mcrypt_module_open(MCRYPT_DES,"",MCRYPT_MODE_ECB,"");
$iv = mcrypt_create_iv(mcrypt_enc_get_iv_size($td), MCRYPT_RAND);
mcrypt_generic_init($td,$key,$iv);
$data = mdecrypt_generic($td, base64_decode($data));
mcrypt_generic_deinit($td);

if (substr($data,0,1) != '!')
return false;

$data = substr($data,1,strlen($data)-1);
return unserialize($data);
}
}

date.php

<?php
class Date {

public function __construct(){}

public function month($p_int){

$monthName = "";

switch ($p_int) {
case 1:
$monthName = "Janvier"; break;
case 2:
$monthName = "Février"; break;
case 3:
$monthName = "Mars"; break;
case 4:
$monthName = "Avril"; break;
case 5:
$monthName = "Mai"; break;
case 6:
$monthName = "Juin"; break;
case 7:
$monthName = "Juillet"; break;
case 8:
$monthName = "Août"; break;
case 9:
$monthName = "Septembre"; break;
case 10:
$monthName = "Octobre"; break;
case 11:
$monthName = "Novembre"; break;
case 12:
$monthName = "Décembre"; break;
}

return $monthName;
}
}
swizzbeat05
Le 18 May 2018
Merci d'avance Monsieur clouder. Bon week-end à vous
Clouder
Le 15 May 2018
Salut swizzbeat05,

Je vais essayer de te trouver les fichiers manquants et de te les mettres ici pout que tu puisses exécuter ton code correctement.