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
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 MoreC 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:
- Start
- Declare variables
a,b, andsum - Input two numbers
aandb - Compute
sum = a + b - Display
sum - Stop
2. Flowchart and Symbols; Print Table
Original question: What is Flow Chart? Explain. And draw the Flow Chart to print table.
Answer:
Read MoreC 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:
=,+=,-
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
.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
Programming Languages: High-level languages such as C#, VB.NET, and F#.
Framework Class Library (FCL): A massive
