School Website
Almost every Indian school site still says "Admissions Open 2024" — because nobody built a notice that knows when to leave.
- PHP
- MySQL
About this project
A full school website — home, about, academics, admissions, faculty, gallery, notices and contact — with an admin area for notices, faculty and enquiries. Plain PHP 8 and MySQL, seeded with realistic content for a fictional CBSE school in Nashik.
Go and look at almost any Indian school website and it still advertises last year's admissions or a sports day that already happened. That is the defining failure of the genre, and it happens because a notice gets published and nobody remembers to take it down. Here every notice carries publish_at and expires_at, the public query filters on NOW() between them, and the admin form requires an expiry date rather than defaulting to never. The rule applies to the detail page too — an expired notice returns 404 rather than sitting on a crawlable URL keeping last year's admissions page ranking. Underneath it, config.php pins PHP and MySQL to the same timezone, because unpinned on a normal machine those two clocks are 5.5 hours apart and every notice would expire at the wrong moment with no visible symptom.
What you will learn
- Model content that expires, instead of content that is published and forgotten
- Pin PHP and MySQL to the same timezone, and understand why a 5.5-hour gap is the default
- Apply a visibility rule to the detail page and not just the list
- Back a form rule with a database CHECK constraint for the paths that bypass the form
- Escape LIKE wildcards so an admin search for "100%" does not return everything
Before you start
- PHP basics — functions, includes, and working with dates
- PHP 8.1+ and MySQL 8 (or MariaDB 10.4+)
- No Composer, no Node — deploys to cPanel shared hosting as files
New to PHP? The free PHP course covers everything this project assumes.
Academic integrity notice
These projects are provided for learning, experimentation and reference. Understand the code, modify it for your own requirements, and acknowledge external work according to your institution’s academic policies. Priodemy does not supply work to be submitted as your own.
Features
- Notices with publish and expiry dates, enforced in the query, the form and a CHECK constraint
- The naive feed ships alongside, so you can see all three notices leak on a real page
- An admin view separating live, scheduled and expired, so the site can be seen as a visitor sees it
- PHP and MySQL clocks pinned to IST, with a proof step that shows the 5.5-hour gap without it
- The expiry rule applied to the detail page — expired and scheduled notices 404, not just hide
- Faculty, gallery and enquiry management, with LIKE wildcards escaped in admin search
Technology stack
Track: Web Development · Level: Major project
What is included
- The full site and admin — commented throughout
- schema.sql with six tables and seed content: nine notices, fifteen teachers, eight gallery items
- proof_notices_expire.php — the real, transactional, self-cleaning proof
Delivered as a 145 KB ZIP. SHA-256 published under Changelog so you can verify it.
System requirements
- Operating system
- Any
- Runtime
- PHP 8.1+ and MySQL 8 / MariaDB 10.4+. No Composer, no Node.
Licence
Learn from it, change it, and use it in your own coursework and personal projects. Do not resell it or pass it off as your own original work.
- Personal and educational use
- Modifying the code however you like
- Using it as the basis of your own coursework, with honest acknowledgement
- Putting your modified version in a portfolio or on your own GitHub
- Reselling or redistributing the project, modified or not
- Presenting it as your own original work
- Commercial deployment — see the Commercial licence
Support window: 6 months from download.
Frequently asked
What actually happens to an expired notice?
It disappears from the public feed and its detail page returns 404. That second half matters more than it sounds: filtering the list but leaving notice.php?id=10 reachable means Google keeps last year's admissions page indexed and ranking for another two years. The shipped proof script inserts an expired, a live and a scheduled notice and shows the naive feed returning all three while the fixed one returns exactly one.
Why does the project care so much about timezones?
Because the whole design rests on PHP and MySQL agreeing about "now", and by default on a normal machine they do not. The proof script prints both clocks unpinned and they are 5.5 hours apart — so notices would expire at the wrong moment and the only symptom would be a school saying the website is unreliable. config.php pins both.
Can a non-technical school office use the admin?
That is the intent — the notices form requires an expiry date rather than letting someone publish something permanent by accident, and the admin separates live, scheduled and expired so the office can see the site the way a parent sees it. Circular uploads validate the extension; the README is explicit about which upload hardening was done and which was not.
Changelog
- First release
SHA-2568669c54bbb080a753aa4a417e5805a3d146db8f0c81cc81a378814d78cc0efdc