Question-Answer-Platform

Question & Answer Platform

A fully functional web-based Q&A platform similar to Stack Overflow, built with PHP, MySQL, and Bootstrap.

Features

User Management

Question Features

Answer Features

Interactive UI

Technologies Used

Installation Instructions

Prerequisites

Step 1: Setup XAMPP

  1. Download and install XAMPP from https://www.apachefriends.org/
  2. Start Apache and MySQL services from XAMPP Control Panel

Step 2: Clone/Download Project

git clone https://github.com/HarshadaPatilS/Question-Answer-Platform.git

Or download ZIP and extract to C:\xampp\htdocs\qa-platform\

Step 3: Database Setup

  1. Open phpMyAdmin (http://localhost/phpmyadmin)
  2. Create a new database named qa_platform
  3. Import the database/setup.sql file
    • Click on the qa_platform database
    • Go to “Import” tab
    • Choose setup.sql file
    • Click “Go”

Step 4: Configure Database Connection

Open config/database.php and update if needed:

private $host = "localhost";
private $db_name = "qa_platform";
private $username = "root";
private $password = "";
private $port = "4306";

Step 5: Run the Application

  1. Open your browser
  2. Navigate to http://localhost/qa-platform/
  3. Sign up for a new account or use demo credentials:
    • Username: john_doe
    • Password: password

Project Structure

qa-platform/
├── config/
│   └── database.php          # Database connection
├── includes/
│   ├── header.php           # Common header
│   ├── footer.php           # Common footer
│   └── functions.php        # Helper functions
├── assets/
│   ├── css/
│   │   └── style.css        # Custom styles
│   ├── js/
│   │   └── script.js        # Custom JavaScript
│   └── images/              # Images
├── auth/
│   ├── login.php            # Login page
│   ├── signup.php           # Registration
│   └── logout.php           # Logout
├── questions/
│   ├── ask_question.php     # Create question
│   ├── view_question.php    # View details
│   └── like_question.php    # Like handler
├── answers/
│   ├── post_answer.php      # Submit answer
│   └── like_answer.php      # Like handler
├── user/
│   ├── profile.php          # User profile
│   └── my_questions.php     # User's questions
├── database/
│   └── setup.sql            # Database schema
├── index.php                # Homepage
└── README.md                # Documentation

Database Schema

Tables

  1. users - User accounts
  2. questions - Posted questions
  3. answers - Question answers
  4. question_likes - Question upvotes
  5. answer_likes - Answer upvotes
  6. tags - Question tags (optional)
  7. question_tags - Question-tag relationships

Usage Guide

For Users

  1. Register: Create account with username, email, password
  2. Login: Access your account
  3. Ask Question: Post new questions with details
  4. Answer: Help others by answering questions
  5. Like: Upvote helpful questions and answers
  6. Profile: View your statistics and activity

For Developers

  1. Clone the repository
  2. Set up local environment
  3. Import database
  4. Configure settings
  5. Start development

API Endpoints (AJAX)


Screenshot (133)

Screenshot (136)

Screenshot (134)

Screenshot (135)

Screenshot (138)

Screenshot (140)

Screenshot (141)

Screenshot (147)

Screenshot (144)

Screenshot (145)

Screenshot (146)