# Phone Number Implementation

## Changes Made

1. **Database Schema Update**:
   - Added `phone` column to the `users` table in `storeweb.sql`
   - Created `add_phone_column.sql` for manual database update

2. **Profile Page Updates** (`profile.php`):
   - Added phone number field to the profile update form
   - Added phone number display in the profile header
   - Updated profile update functionality to handle phone numbers

3. **Registration Page Updates** (`auth/register.php`):
   - Added phone number field to the registration form
   - Updated registration logic to save phone numbers

## Database Migration

To update your existing database, run the following SQL command in phpMyAdmin or your MySQL client:

```sql
ALTER TABLE users ADD COLUMN phone VARCHAR(20) DEFAULT NULL;
```

Or execute the provided `add_phone_column.sql` file.

## Files Modified

- `storeweb.sql` - Added phone column to users table schema
- `profile.php` - Added phone number field to profile form and display
- `auth/register.php` - Added phone number field to registration form
- `add_phone_column.sql` - SQL script for adding phone column to existing databases

## Implementation Notes

- The phone field is optional (not required)
- Phone numbers are sanitized using the existing `sanitizeInput()` function
- Phone numbers are displayed on the profile page only if they exist
- All existing functionality remains unchanged