Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
sfcode
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ayush
sfcode
Commits
c2a01f47
Commit
c2a01f47
authored
Oct 28, 2020
by
Aniket Gudipaty
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added database
parent
9eb2a035
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
89 additions
and
0 deletions
+89
-0
backend/database.php
backend/database.php
+17
-0
backend/users.sql
backend/users.sql
+72
-0
No files found.
backend/database.php
0 → 100644
View file @
c2a01f47
<?php
header
(
"Access-Control-Allow-Origin: *"
);
header
(
'Access-Control-Allow-Credentials: true'
);
header
(
"Access-Control-Allow-Methods: PUT, GET, POST, DELETE"
);
header
(
"Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept"
);
header
(
"Content-Type: application/json; charset=UTF-8"
);
$db_host
=
'localhost'
;
// Uncomment and assign values according to your system
$db_username
=
'root'
;
$db_password
=
''
;
$db_name
=
'ssl_database'
;
// add name of your own databse from mysql phpmyadmin
$mysqli
=
new
mysqli
(
$db_host
,
$db_username
,
$db_password
,
$db_name
);
if
(
$mysqli
->
connect_error
)
{
die
(
'Error : ('
.
$mysqli
->
connect_errno
.
') '
.
$mysqli
->
connect_error
);
}
?>
\ No newline at end of file
backend/users.sql
0 → 100644
View file @
c2a01f47
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Oct 28, 2020 at 02:33 AM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.10
SET
SQL_MODE
=
"NO_AUTO_VALUE_ON_ZERO"
;
START
TRANSACTION
;
SET
time_zone
=
"+00:00"
;
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */
;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */
;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */
;
/*!40101 SET NAMES utf8mb4 */
;
--
-- Database: `ssl_database`
--
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE
TABLE
`users`
(
`id`
int
(
11
)
NOT
NULL
,
`username`
varchar
(
50
)
NOT
NULL
,
`name`
varchar
(
50
)
DEFAULT
NULL
,
`password`
varchar
(
255
)
DEFAULT
NULL
,
`email`
varchar
(
255
)
DEFAULT
NULL
,
`img_url`
text
DEFAULT
'https://bain.design/wp-content/uploads/2014/08/People-Avatar-Set-Rectangular-12.jpg'
,
`n_attempts`
int
(
11
)
NOT
NULL
DEFAULT
0
,
`correct_timeline`
text
DEFAULT
'[]'
,
`rating`
int
(
11
)
NOT
NULL
DEFAULT
0
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
;
--
-- Dumping data for table `users`
--
INSERT
INTO
`users`
(
`id`
,
`username`
,
`name`
,
`password`
,
`email`
,
`img_url`
,
`n_attempts`
,
`correct_timeline`
,
`rating`
)
VALUES
(
24
,
'ayushjangir'
,
'Ayush Jangir'
,
'$2y$10$VXSfup83ux6QKRIt4LPPZ.lAz7GbvN6yT/Tk5LH5eNKk1oussrwHm'
,
'jangirayush59@gmail.com'
,
'https://bain.design/wp-content/uploads/2014/08/People-Avatar-Set-Rectangular-12.jpg'
,
150
,
'[0,1,1,0,1,0,1,1,0,1,1,1,0,0,0,1,1,1,0,1,1,1,0,1,1,0,0,0,1,0,1,0,1,1,1,1,1,1,1,0,1,0,1,1,1,0,1,1,0,0,0,1,0,0,1,0,1,0,1,1,0,1,0,0,0,1,0,1,1,1,1,0,0,0,0,1,0,0,0,0,1,1,0,0,0,0,1,0,0,0,0,1,0,1,0,1,1,0,0,1,1,0,1,0,0,0,0,0,0,1,1,1,1,0,0,0,1,1,1,1,0,0,1,0,1,1,1,1,1,0,1,1,1,1,0,1,1,1,0,0,0,0,1,0,1,0,1,1,1,1]'
,
1278
);
--
-- Indexes for dumped tables
--
--
-- Indexes for table `users`
--
ALTER
TABLE
`users`
ADD
PRIMARY
KEY
(
`id`
);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `users`
--
ALTER
TABLE
`users`
MODIFY
`id`
int
(
11
)
NOT
NULL
AUTO_INCREMENT
,
AUTO_INCREMENT
=
25
;
COMMIT
;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */
;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */
;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */
;
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment