Skip to content

Instantly share code, notes, and snippets.

@coder618
Last active December 3, 2020 07:10
Show Gist options
  • Save coder618/df110be25b1f8d483d443ec36fdadf43 to your computer and use it in GitHub Desktop.
Save coder618/df110be25b1f8d483d443ec36fdadf43 to your computer and use it in GitHub Desktop.
Notionhive Assessment
Q1: Suppose this array come from back-end. data of this array can be dynamic.
You have to make a Dynamic HTML Output (using ul tag) based on this array,
where each item will fall under its parent id.
output will look something like this.
Bangladesh
Dhaka
Uttara
Khilgaon
Noyakhali
Maijdi
Canada
Torrento
<?php
$arr = [
[
"id" => 500,
"p_id" => 0,
"title" => "Bangladesh"
],
[
"id" => 510,
"p_id" => 500,
"title" => "Dhaka"
],
[
"id" => 511,
"p_id" => 510,
"title" => "Uttara"
],
[
"id" => 512,
"p_id" => 510,
"title" => "Khailgaon"
],
[
"id" => 513,
"p_id" => 500,
"title" => "NoyaKhali"
],
[
"id" => 514,
"p_id" => 513,
"title" => "Maijdi"
],
[
"id" => 515,
"p_id" => 0,
"title" => "Canada"
],
[
"id" => 516,
"p_id" => 515,
"title" => "Toronto"
],
];
?>
Q2:
Make a simple CRUD application where front-end and Back-end are completely separate from
each other.
Front End requirement:
CRUD fields list = title, detail
Data From front end must be submitted by AJAX request. You can use any javascript library/framwork
like: jQuery, React, Angular etc.
Backend requirement:
1. Backend Must be in PHP, MYSQL.
2. All data should be SANITIZE for PROTECT SQL injection before Insert into MYSQL table.
3. Data from Database must be escape before showing as HTML content.
--------How to submit----------
1. Put all the files in a ZIP file
2. For Question 2 provide us the instruction how we can test/install your simple CRUD application in our PC.
3. Send the ZIP file only.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment