hi im trying to accomplish something is there a php script that already do this that i can buy or downloap for free.

were user can login and get a personal calader they enter detail in the calander for each day and in the back admin the administrator can view a user clander and everything the have entered for a complete month?

if this doesnt exist how would i start to build one my self using an available free php clander script.

Dani AI

Generated

FullCalendar + a small CodeIgniter API is a good fit for this workflow. was right to point to an AJAX calendar — use the calendar for dayClick/eventDrop hooks and call CI endpoints to persist changes. Rather than a column-per-day, store one normalized row per user+date (one row per meal selection). This keeps queries simple and scales to many users.

A compact schema that covers user-selected meals and admin-managed meal items:

CREATE TABLE meals (
  id INT AUTO_INCREMENT PRIMARY KEY,
  name VARCHAR(120) NOT NULL,
  description TEXT,
  active TINYINT(1) DEFAULT 1,
  created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

CREATE TABLE orders (
  id INT AUTO_INCREMENT PRIMARY KEY,
  user_id INT NOT NULL,
  meal_id INT NOT NULL,
  order_date DATE NOT NULL,
  quantity SMALLINT DEFAULT 1,
  notes VARCHAR(255),
  status ENUM('confirmed','pending','cancelled') DEFAULT 'confirmed',
  created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
  updated_at TIMESTAMP NULL,
  KEY idx_user_date (user_id, order_date)
  -- add UNIQUE (user_id, order_date) if only one meal per day is allowed
);

Backend/API patterns (CodeIgniter controllers):

  • GET events: return JSON for FullCalendar for a user and date range (use parameters start/end).
  • POST create: accept user_id, meal_id, order_date, quantity, notes.
  • PUT update / DELETE endpoints for edits/cancels. Protect all endpoints so regular users can only modify their own orders; admin role can request any user's month.

Example query to fetch a single user’s month (for admin view):

SELECT o.order_date, m.name
FROM orders o
JOIN meals m ON m.id = o.meal_id
WHERE o.user_id = ? AND o.order_date BETWEEN ? AND ?
ORDER BY o.order_date;

Implementation notes: use FullCalendar callbacks (dayClick to open a modal with the meal list, eventReceive/eventDrop to persist drag actions), keep dates as DATE if time-of-day is irrelevant (avoids timezone surprises), add indexes on (user_id, order_date) for fast month queries, and use CI’s query builder/CSRF protection for security. ’s single-row-per-entry idea is the right baseline; the above normalizes meals and gives admin-friendly joins for monthly reports.

Recommended Answers

All 8 Replies

Ahh, I remember installing something simular to this, using Ajax and then I built my own form where users can then add their own dates etc..

http://arshaw.com/fullcalendar/

It's quite good :)

hi thanks for you replied i checked it out it can be usefull.all i need to know is how i go about to each day they pick on the calander they get a popup form for them to fill out.im using this for a snack shop a user with an account have to choose their meal for a hole month, everyday a different thing. In the adminpanel the admin can check the order for a specific user for the whole month.hope you understand what im trying to achive here.

Ok.

I think I do, but can you make the following clear:

  • How are the user's identified? Do they sign in some how
  • Does the Adam see multiple calendars, or, just one calendar that has all of the people?
  • How are you handling the meals? For example, are they stored? If so, can the meals be in a drop-down?
  • ok each user will have to login to see thier calendar with username and password.
  • the admin can see the calendar of all user that has an account.
  • the admin will add the meal in the backend and store in a db. when the user click on a day on their calendar they will get a popup form with all the meals with check box next to them and they save after choosing thier meal and that is store in a database.

Hey,

What you need to do is download and install the Ajax version of this calendar. Thus, will provide you to access the multi-user aspect you require. Then, you need to create a form that inputs the data into a database. Then, finally, creating an Admin page that will allow people to see calendars.

Hope this helps,

Let me know if you need any more help :)

ok thanks i will take a look at it if i run into anytrouble ill let you know thanks for your help

Hi again ive checked some option about the calender and came accross this which will fit my need quite well

I guess on the side, for the item to dragg on the calender i can make it take from a database.

but my biggest calange is

  • how would i store the item that i drag in each date on the calander ina database.
  • how do i build a database for a calander and yet for multiuser.i mean how to structure or design that database i can't create colum for each day on the calander that would be insane

hope you can help out thanks)

user table
users
user_id, name etc

calendar entry table
entries
entry_id,user_id,startdate,starttime,enddate,endtime,comment

entry_id is a unique identifier for EVERY entry ever created on the calendar, dragging an entry uses it to identify that entry has moved and updates it accordingly.

Then per user do a mysql select using their unique user_id

$Q = "SELECT * FROM entries WHERE user_id = $user_id";
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.