A web system for validating Italian VAT numbers
- Individual validation of Italian VAT numbers
- Bulk processing via CSV files
- Automatic correction of numbers without "IT" prefix
- Storage of results in MySQL database
- Visualization of categorized results (Valid, Corrected, Invalid)
qbind/
├── db/
│ ├── Database.php # Database connection class
│ └── seed.sql # Schema and sample data
├── layout/ # UI components
├── index.php # Main page
├── process_upload.php # CSV file processor
├── VatValidator.php # VAT validation logic
├── results.php # List data from DB
├── styles.css # CSS styles
└── README.md # This documentation
- XAMPP v8.2 installed and running
- Apache Server
- MySQL Database
- PHP
-
Clone/Download the project
# If you have git git clone into xampp\htdocs # Or extract files to: xampp\htdocs\qbind\
-
Configure Database
Option A: Using phpMyAdmin
- Go to
http://localhost/phpmyadmin
- Create database named
challenge
- Import the file
db/seed.sql
Option B: From command line
# Connect to MySQL mysql -u root -p # Create database CREATE DATABASE IF NOT EXISTS challenge; USE challenge; # Import schema (default route, change to your actual directory) SOURCE c:/xampp/htdocs/qbind/db/seed.sql;
- Go to
- Open web browser
- Go to:
http://localhost/qbind
- Enter VAT number in the "Vat number" field
- Valid examples:
IT12345678901
(complete format)12345678901
(auto-corrected by adding "IT")
- Click "Check"
- Select CSV file
- Click "Upload"
- View categorized results
- Valid format:
IT
followed by exactly 11 digits - Example:
IT12345678901
- Auto-correction: If only 11 digits are provided, "IT" prefix is automatically added