# Bhavanam Realtoms website ## Admin sign-in setup The Admin link opens `/admin.php`. Sign-in uses the fixed username `admin` and a password hash stored in the MySQL/MariaDB `admin_users` table. Google sign-in has been removed. Do not use a shared/default password such as `Admin@123`; choose a unique, strong password. 1. In Hostinger hPanel, create a MySQL database and a database user, and grant that user access to the database. 2. The project's `database.sql` selects `u865739851_bhavanam` before creating the admin table. Confirm this matches the database name in hPanel. In phpMyAdmin, open that database's **Import** tab and import the file. If you use a different database, update the `USE` line in `database.sql` to its exact name first. 3. In Hostinger File Manager, create `public_html/storage/database-config.php` containing the following PHP array with your actual database details. Keep the `storage/` folder private; its server rules deny direct web access: Copy these settings from hPanel → **Databases → Management**. Use the database host Hostinger displays; do not assume it is `localhost`. ```php 'YOUR_HOSTINGER_MYSQL_HOST', 'database' => 'u865739851_bhavanam', 'username' => 'YOUR_EXACT_HOSTINGER_DATABASE_USER', 'password' => 'YOUR_HOSTINGER_DATABASE_USER_PASSWORD', ]; ``` Alternatively, set `BHAVANAM_DB_HOST`, `BHAVANAM_DB_NAME`, `BHAVANAM_DB_USER`, and `BHAVANAM_DB_PASSWORD` as PHP environment variables. 4. Generate a password hash on a trusted computer with PHP: `php -r '$p = readline("Password: "); echo password_hash($p, PASSWORD_DEFAULT), PHP_EOL;'`. Enter your chosen password at the prompt; never put the plaintext password in website code or a command. 5. In phpMyAdmin's **SQL** tab, create the admin account using the generated hash: ```sql INSERT INTO admin_users (username, password_hash) VALUES ('admin', 'PASTE_THE_GENERATED_HASH_HERE'); ``` 6. Ensure PHP has the PDO MySQL extension and can write to `storage/` and `uploads/`. Deploy over HTTPS, then visit `/admin.php` and sign in with ID `admin` and your chosen password. The page reports a safe, specific hint for common database connection errors; full details are written to the Hostinger PHP error log. To change the password, generate a new hash and update the `admin_users.password_hash` value for `admin`. Existing admin sessions are invalidated when the hash changes. Do not commit database credentials, password hashes, or plaintext passwords. For multiple simultaneous image uploads, configure PHP's `post_max_size` high enough for the combined request (for example, `64M`) and `upload_max_filesize` to at least `5M`. ## Website content The editor manages header and footer labels, company contact details, the company logo, home-page and inner-page copy, projects, locations, team members, guidelines, images, and site-wide theme colours. The first saved edit creates `storage/site-content.json`. Uploaded JPG, PNG and WebP images are assigned generated filenames in `uploads/`; uploads are limited to 5 MB each. The website starts with example project and employee names. Replace them with accurate information and verify MahaRERA registration details before publishing. Review company guidelines with qualified legal and HR professionals before adopting them as formal policy. The public email and phone number are placeholders; replace them in the admin editor before publishing.