SQL, PHP Integration and Web Security Best Practices

SIDE A: Database, SQL & PHP Integration

1. SQL Fundamentals (Chapters 8 & 9)

  • Data Definition Language (DDL) – Structure

    • Create DB: CREATE DATABASE publications; USE publications;

Create Table:

CREATE TABLE users (
    id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
    username VARCHAR(128),
    password CHAR(255) -- Fixed length best for hashes
) ENGINE=MyISAM;
  • Alter Table:

    • ALTER TABLE users ADD email VARCHAR(255);
    • ALTER TABLE users DROP email;
    • ALTER TABLE users MODIFY year SMALLINT;
    • ALTER TABLE
Read More

Cybersecurity Techniques: Email Tracking, Keylogging, and HTTP Tunneling

Email Tracking Explained

Definition

E-mail tracking is the technique used to monitor and record information about emails sent, such as whether the email was opened, when it was opened, how many times it was opened, and from which location or IP address. It is mainly used during footprinting and information gathering to collect useful details about the recipient.

Explanation

E-mail tracking works by embedding a tracking element (such as a tracking pixel or link) inside the email. When the receiver opens

Read More

C Programming Questions and Answers: Algorithms, Flowcharts & Core Concepts


Q1. Attempt Any Two Questions (15 Marks)


1. Explain Algorithm and Add Two Numbers

Original question: Explain Algorithm? Write an algorithm to add two numbers.

Answer:
An algorithm is a step-by-step method to solve a problem or perform a specific task.

Algorithm to add two numbers:

  1. Start
  2. Declare variables a, b, and sum
  3. Input two numbers a and b
  4. Compute sum = a + b
  5. Display sum
  6. Stop

2. Flowchart and Symbols; Print Table

Original question: What is Flow Chart? Explain. And draw the Flow Chart to print table.

Answer:

Read More

C Programming Fundamentals and Practical Code Examples

Unary, Binary, and Ternary Operators in C

A unary operator in C is an operator that works on only one operand. Common unary operators include ++ (increment), -- (decrement), - (unary minus), ! (logical NOT), and sizeof.

A binary operator in C is an operator that works on two operands. Examples include:

  • Arithmetic operators: +, -, *, /, %
  • Relational operators: ==, !=, >, <, >=, <=
  • Logical operators: &&, ||
  • Bitwise operators: &, |, >>, <<
  • Assignment operators: =, +=, -
Read More

Database Systems: Architecture, Design, and Normalization

Three-Level Database Architecture

The three-level (three-schema) architecture separates how data is physically stored, logically structured, and viewed by different users. This is the ANSI/SPARC architecture, and it exists mainly to provide data abstraction and data independence.

External, Conceptual, and Internal Levels

  • External (View) level: This is the level closest to the users; it defines multiple user views (external schemas). Each view shows only part of the database relevant to that user or
Read More

.NET Framework Architecture: CLR, GC, and C# Fundamentals

Understanding the .NET Framework Architecture

The .NET Framework is a managed execution environment for Windows that provides a variety of services to its running applications. Its architecture is designed to make software development consistent and to allow different programming languages (like C#, VB.NET, and F#) to work together seamlessly.

The Four Core Components of .NET Architecture

  1. Programming Languages: High-level languages such as C#, VB.NET, and F#.

  2. Framework Class Library (FCL): A massive

Read More