This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang = "en"> | |
<head> | |
<link rel = "stylesheet" type = "text/css" href = "css/bootstrap.css"/> | |
<link rel = "stylesheet" type = "text/css" href = "css/style.css"/> | |
<meta charset = "UTF-8" name= "viewport" content = "width=device-width, initial-scale=1" /> | |
</head> | |
<body> | |
<nav class = "navbar navbar-default" style="background-color: #337ab7;"> | |
<div class = "container-fluid"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang = "en"> | |
<head> | |
<link rel = "stylesheet" type = "text/css" href = "css/bootstrap.css"/> | |
<link rel = "stylesheet" type = "text/css" href = "css/style.css"/> | |
<meta charset = "UTF-8" name= "viewport" content = "width=device-width, initial-scale=1" /> | |
</head> | |
<body> | |
<nav class = "navbar navbar-default"> | |
<div class = "container-fluid"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$conn = new mysqli('localhost', 'root', '', 'image'); | |
if(ISSET($_POST['save'])){ | |
if($_FILES['image']['name'] == ""){ | |
echo '<script>alert("Veuillez selectionner une image")</script>'; | |
echo '<script>window.location = "index.php"</script>'; | |
}else{ | |
$image = addslashes(file_get_contents($_FILES['image']['tmp_name'])); | |
$image_name = addslashes($_FILES['image']['name']); | |
$image_size = getimagesize($_FILES['image']['tmp_name']); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- | |
-- Database: `image` | |
-- | |
CREATE TABLE `photo` ( | |
`photo_id` int(11) NOT NULL, | |
`photo_name` varchar(100) NOT NULL | |
) ENGINE=InnoDB DEFAULT CHARSET=latin1; | |
-- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<?php | |
$conn = new mysqli('localhost', 'root', '', 'db_voiture') or die(mysqli_error()); | |
?> | |
<html lang = "eng"> | |
<head> | |
<meta charset = "UTF-8" /> | |
<link rel = "stylesheet" type = "text/css" href = "css/bootstrap.css" /> | |
</head> | |
<body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE IF NOT EXISTS user ( | |
user_id int(11) NOT NULL AUTO_INCREMENT, | |
username varchar(50) NOT NULL, | |
password varchar(50) NOT NULL, | |
PRIMARY KEY (user_id) | |
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$conn = new mysqli('localhost', 'root', '', 'connexion'); | |
if($conn->connect_error){ | |
die("Erreur: Impossible de se connecter à la base de données: ". $conn->connect_error); | |
} | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<?php | |
require 'connect.php'; | |
?> | |
<html lang = "eng"> | |
<head> | |
<meta charset = "UTF-8" /> | |
</head> | |
<body style="background-color: #DCDCDC"> | |
<center><h2>Création d'un formulaire de connexion en Php avec MySQLi / jQuery</h2></center> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
#content{ | |
background-color: #1E90FF; | |
width:340px; | |
height:110px; | |
margin: 50px auto; | |
padding:11px; | |
border-radius:2px; | |
-webkit-box-shadow:0px 0px 30px 3px #000; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function(){ | |
$error = $('<center><label style = "color:#ff0000;">Nom d\'utilisateur ou mot de passe incorrect</label></center>'); | |
$error2 = $('<center><label style = "color:#ff0000;">Utilisateur n\' existe pas!</label></center>'); | |
$success = $('<center><label style = "color:#00ff00;">Connexion réussie!</label></center>'); | |
$loading = $('<center><img src = "loading.gif" height = "5px" width = "100%"/></center>'); | |
$('#login').on('click', function(){ | |
$error.remove(); | |
$error2.remove(); | |
$username = $('#username').val(); | |
$password = $('#password').val(); |
OlderNewer