Skip to content

Instantly share code, notes, and snippets.

View krez69's full-sized avatar
🏠
Working from home

Walid krez69

🏠
Working from home
View GitHub Profile
@krez69
krez69 / congratulation.php
Last active October 6, 2019 19:47
formulaire avec redirection après validation
<?php
echo "Merci à bientot";
http://zupimages.net/viewer.php?id=19/40/4zlj.jpg
http://zupimages.net/viewer.php?id=19/40/dk33.jpg
http://zupimages.net/viewer.php?id=19/40/bns5.jpg
//Requete d'insertion
mysql> INSERT INTO school (name, country, capacity) VALUES ('Hogwarts School of Witchcraft and Wizardry', 'United Kingdom', 400), ('Ilvermorny School of Witchcraft and Wizardry' , 'USA', 300), ('Koldovstoretz', 'Russia', 125), ('Mahoutokoro School of Magic', 'Japan', 800), ('Uagadou School of Magic', 'Uganda', 350);
mysql> SELECT * FROM school;
+----+----------------------------------------------+----------+----------------+
| id | name | capacity | country |
+----+----------------------------------------------+----------+----------------+
| 1 | Beauxbatons Academy of Magic | 550 | France |
1ER REQUETE
mysql> SELECT *
-> FROM `wizard`
-> WHERE birthday
-> BETWEEN '1975-01-01' AND '1985-01-01';
+----+-----------+----------+------------+-------------+---------------------------------------+-----------+
| id | firstname | lastname | birthday | birth_place | biography | is_muggle |
+----+-----------+----------+------------+-------------+---------------------------------------+-----------+
| 1 | harry | potter | 1980-07-31 | london | | 0 |
mysql> show tables;
+-------------------------+
| Tables_in_wild_db_quest |
+-------------------------+
| school |
| wizard |
+-------------------------+
2 rows in set (0.00 sec)
mysql> DESCRIBE wizard;
http://zupimages.net/viewer.php?id=19/39/ip6a.jpg
<?php
function writeSecretSentence(string $name1, string $name2) : string
{
$phrasing = $name1 . " s'incline face à " . $name2;
return $phrasing;
}
$phrasing = writeSecretSentence('dog','moon');
echo $phrasing;
<?php
set_time_limit(5);
$weapons = ['fists', 'whip', 'gun'];
$opponentWeapon = $weapons[rand(0,2)]; // Cela permet de choisir une arme de manière aléatoire.
// TODO
$indyWeapon = '';
<?php
set_time_limit(5);
$movieIndiana = [
'Indiana Jones et le Royaume du Crâne de Cristal' => ['broly', 'goku','vegeta'],
'Indiana Jones et la Dernière Croisade' => ['bulma','picolo','trunks'],
'Indiana Jones et le Temple maudit' => ['yamcha','krilin','sangohan'],
];
foreach ($movieIndiana as $movie=>$actors){
echo "Dans le film $movie,".' ';
<? php
$message1 = "0@sn9sirppa@#?ia'jgtvryko1";
$message2 = "q8e?wsellecif@#?sel@#?setuotpazdsy0*b9+mw@x1vj";
$message3 = "aopi?sgnirts@#?sedhtg+p9l!";
$number1 = strlen($message1) / 2;
$number2 = strlen($message2) / 2;
$number3 = strlen($message3) / 2;