+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/fetch_sections.php b/fetch_sections.php
new file mode 100644
index 0000000..7ed72de
--- /dev/null
+++ b/fetch_sections.php
@@ -0,0 +1,12 @@
+query($query);
+
+$sections = array();
+while ($row = $result->fetch_assoc()) {
+ $sections[] = $row;
+}
+
+echo json_encode($sections);
diff --git "a/images/DALL\302\267E 2024-09-16 09.00.20 - A colorful cartoon scene featuring a playful forest with animated animals such as a smiling bear, a dancing rabbit, and a cheerful bird singing on a t.webp" "b/images/DALL\302\267E 2024-09-16 09.00.20 - A colorful cartoon scene featuring a playful forest with animated animals such as a smiling bear, a dancing rabbit, and a cheerful bird singing on a t.webp"
new file mode 100644
index 0000000..a2e68ec
Binary files /dev/null and "b/images/DALL\302\267E 2024-09-16 09.00.20 - A colorful cartoon scene featuring a playful forest with animated animals such as a smiling bear, a dancing rabbit, and a cheerful bird singing on a t.webp" differ
diff --git "a/images/DALL\302\267E 2024-09-16 09.00.24 - A colorful cartoon scene for a kids' song titled 'Dancing in the Jungle', featuring cheerful animals like a monkey, a tiger, and a parrot dancing in a.webp" "b/images/DALL\302\267E 2024-09-16 09.00.24 - A colorful cartoon scene for a kids' song titled 'Dancing in the Jungle', featuring cheerful animals like a monkey, a tiger, and a parrot dancing in a.webp"
new file mode 100644
index 0000000..290c069
Binary files /dev/null and "b/images/DALL\302\267E 2024-09-16 09.00.24 - A colorful cartoon scene for a kids' song titled 'Dancing in the Jungle', featuring cheerful animals like a monkey, a tiger, and a parrot dancing in a.webp" differ
diff --git a/images/communication-infrastructure.jpg b/images/communication-infrastructure.jpg
new file mode 100644
index 0000000..4e657ed
Binary files /dev/null and b/images/communication-infrastructure.jpg differ
diff --git a/images/digital-learning.jpg b/images/digital-learning.jpg
new file mode 100644
index 0000000..755171f
Binary files /dev/null and b/images/digital-learning.jpg differ
diff --git a/images/image-placeholder.jpg b/images/image-placeholder.jpg
new file mode 100644
index 0000000..a8d4354
Binary files /dev/null and b/images/image-placeholder.jpg differ
diff --git a/images/technology-solutions.jpg b/images/technology-solutions.jpg
new file mode 100644
index 0000000..51b3b5b
Binary files /dev/null and b/images/technology-solutions.jpg differ
diff --git a/index.php b/index.php
new file mode 100644
index 0000000..89ffdf1
--- /dev/null
+++ b/index.php
@@ -0,0 +1,142 @@
+ PDO::ERRMODE_EXCEPTION,
+ PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
+ PDO::ATTR_EMULATE_PREPARES => false,
+];
+
+try {
+ $pdo = new PDO($dsn, $user, $pass, $options);
+} catch (PDOException $e) {
+ echo "Connection failed: " . $e->getMessage();
+ exit;
+}
+
+// Include CRUD operations
+include 'crud.php';
+
+// Fetch sections
+$sections = getSections($pdo);
+
+// Set default values
+$defaultImage = 'images/image-placeholder.jpg';
+
+// Fallback for the first section
+$firstSection = !empty($sections) ? $sections[0] : [
+ 'title' => 'DelphianLogic in Action',
+ 'description' => [], // Assuming description is an array now
+ 'image' => $defaultImage
+];
+?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/js/script.js b/js/script.js
new file mode 100644
index 0000000..34ca875
--- /dev/null
+++ b/js/script.js
@@ -0,0 +1,18 @@
+$('#editModal').on('show.bs.modal', function (event) {
+ var button = $(event.relatedTarget); // Button that triggered the modal
+ var id = button.data('id'); // Extract info from data-* attributes
+ var title = button.data('title');
+ var description = button.data('description');
+ var image = button.data('image');
+
+ // Update the modal's content
+ var modal = $(this);
+ modal.find('#editId').val(id);
+ modal.find('#editTitle').val(title);
+ modal.find('#editDescription').val(description);
+ if (image) {
+ modal.find('#editImagePreview').attr('src', image).show();
+ } else {
+ modal.find('#editImagePreview').hide();
+ }
+});
diff --git a/question.md b/question.md
new file mode 100644
index 0000000..b9b6c84
--- /dev/null
+++ b/question.md
@@ -0,0 +1,50 @@
+
+# Answers to Technical Questions
+
+### 1. How long did you spend on the coding test? What would you add to your solution if you had more time?
+I spent approximately 2-3 hours on the coding test. If I had more time, I would focus on the following enhancements:
+- **Refactor Code:** Improve code modularity and readability, ensuring clean architecture with proper separation of concerns.
+- **Error Handling:** Add more comprehensive error handling and edge-case coverage to ensure robustness.
+- **Performance Optimization:** Fine-tune any performance bottlenecks that could arise when handling larger datasets or more complex computations.
+- **Unit Tests:** Increase test coverage with more unit tests to validate edge cases and scenarios.
+- **Documentation:** Add detailed comments and documentation to make the code easier to understand and maintain.
+
+### 2. How would you track down a performance issue in production? Have you ever had to do this?
+Yes, I have had to track down performance issues in production. My approach typically involves the following steps:
+- **Monitor Logs:** I would first analyze logs (using tools like ELK stack, Graylog, or Splunk) to identify unusual patterns or slow queries.
+- **Profiling:** Use profiling tools such as New Relic, Blackfire, or Xdebug to pinpoint the slow sections of code, database queries, or API calls.
+- **Database Optimization:** I would check database queries for inefficiencies such as missing indexes, slow joins, or large datasets causing delays.
+- **Caching:** Review and optimize the use of caching layers (e.g., Redis, Memcached) to reduce unnecessary processing.
+- **Load Testing:** Use load testing tools like Apache JMeter or k6 to simulate high traffic and observe where the bottlenecks appear.
+- **Code Review:** Conduct code reviews to check for inefficient algorithms or resource-heavy operations.
+
+### 3. Please describe yourself using JSON.
+
+```json
+{
+ "name": "Full Stack Developer",
+ "experience": "2+ years in Laravel and Full Stack Development",
+ "skills": [
+ "PHP",
+ "Laravel",
+ "JavaScript",
+ "React.js",
+ "Node.js",
+ "MySQL",
+ "Docker",
+ "Microservices"
+ ],
+ "interests": [
+ "Web Development",
+ "API Design",
+ "Cloud",
+ "Open Source Contributions"
+ ],
+ "current_focus": "Building microservices with Docker and KrakenD",
+ "education": "Master of Computer Application, VIT Chennai",
+ "goals": [
+ "Enhance microservices architecture skills",
+ "Explore more opportunities in full-stack development",
+ "Contribute to open-source projects"
+ ]
+}