Skip to content

Instantly share code, notes, and snippets.

View KOUISAmine's full-sized avatar

Amine KOUIS KOUISAmine

View GitHub Profile
<?php
require_once 'connect.php';
$username = $_POST['username'];
$password = $_POST['password'];
$stmt = $conn->prepare("SELECT * FROM `user` WHERE username = '$username' && `password` = '$password'") or die(mysqli_error());
if($stmt->execute()){
$result = $stmt->get_result();
$num_rows = $result->num_rows;
}
if($num_rows > 0){
<!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>
<?php
function getCdnUrls($html)
{
$cdnUrl = "//cdn.mon-domain.com";
$baseUrl = "mon-domain.com";
$patterns = [
// Match sources that are from the www or mobile urls
// We check for the schema as well as protocol relative urls
'~(<(img|script|link)[^>]*)(src|href) *= *(["\'])(https?:)?//(' . preg_quote($baseUrl) . ')~',
@KOUISAmine
KOUISAmine / JsonSchemaExample.json
Last active November 6, 2023 01:45
JsonSchemaExample
{
"type": "object",
"properties": {
"users": {
"type": "array",
"minItems": 20,
"maxItems": 20,
"uniqueItems": true,
"items": {
"type": "object",