Skip to content

Instantly share code, notes, and snippets.

View gianghl1983's full-sized avatar

Giang Le gianghl1983

View GitHub Profile
<?php
$server = 'localhost';
$username = 'giang2424_demo';
$password = '05012011';
$database = "giang2424_quanlythuchi";
$db_qltc = new mysqli($server, $username, $password, $database);//Thay tên $db_qltc
$db_qltc->set_charset('utf8');
if ($db_qltc->connect_error) {
echo "<br>Lỗi kết nối";
$answers = [
['question_id' => 1, 'option' => 'C'],
['question_id' => 2, 'option' => 'A'],
['question_id' => 3, 'option' => 'C'],
['question_id' => 4, 'option' => 'B'],
['question_id' => 5, 'option' => 'C'],
['question_id' => 6, 'option' => 'C'],
['question_id' => 7, 'option' => 'D'],
['question_id' => 8, 'option' => 'D']
];
@gianghl1983
gianghl1983 / log.php
Created May 20, 2018 12:36
Kiểm tra người dùng đã đăng nhập chưa
<?php
if ($_GET['submit']) {
//do SMT
}
?>