0

Hi,

I am trying to design a website, where we have a table containing the days of the week and hours. The idea is to populate this table by its connection to the database.

So two pages: Make appointment:

1. I insert into the database via php website selecting time and day.
2. I view the schedule where the php should access the database to populate the table.


So if I have placed an appointment on monday at 8:00, the table in that time slot should have an entry.

I would really appreciate any example or if you could point me to any existing php scripts that does the above.

regards,

Mike

2
Contributors
3
Replies
5
Views
8 Years
Discussion Span
Last Post by CFROG
0

There are many ways to populate a table based on info you are pulling from a table in db. Have you written the code where you are actively submitting appointments to the the database ?

0

I haven't written the code but what I don't know how to do is get that particular time slot to be inserted into the database. I don't know how to do it.

0

I guess it would all depend on what you mean by time slot. If you are referring to a particular day and time I would probably just do something like this.

mysql_query("INSERT INTO appointments SET 
customer='$customer_id', 
day='$day', 
time='$time' ");

Where the values of $customer_id, $day, and $time are defined through a form input.

Edited by CFROG: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.