Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
SIMPLE BOOKING SYSTEM
Old 04-19-2006, 02:02 PM SIMPLE BOOKING SYSTEM
Junior Talker

Posts: 2
Trades: 0
Hi, I have just created a simple booking system using PHP and MYSQL. I wondered if anyone could help me prevent identicle booking being input into the database.

Cheers,

Matt
matt66 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-19-2006, 02:29 PM Re: SIMPLE BOOKING SYSTEM
dk01's Avatar
Ultra Talker

Posts: 373
Location: Ames, IA
Trades: 0
When are multiple bookings being created? When the user submits the booking form?
__________________
Did I help you? If so, be nice and throw me some
Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
dk01 is offline
Reply With Quote
View Public Profile
 
Old 04-19-2006, 02:32 PM Re: SIMPLE BOOKING SYSTEM
Junior Talker

Posts: 2
Trades: 0
Hi,
No, you can only make one booking at a time, but you can make the same booking again. i just really want to try and stop the same date and time being booked. It's for a swimming instructor, so users can book a lesson.

Cheers,

Matt
matt66 is offline
Reply With Quote
View Public Profile
 
Old 04-21-2006, 01:51 AM Re: SIMPLE BOOKING SYSTEM
Novice Talker

Posts: 8
Trades: 0
could u kindly rephrase that...
as in you dont want the student to be able to make a booking for a certain time he has already had made a booking for?
if thats so i suppose you must be having a form where you have defined time slots
now before entering the data to the database just run a query to check if person with that studentid or whatever has not already made a booking
PHP Code:
$sql "SELECT time FROM booking WHERE id='$studentid' AND time='$postedtime'";
$query mysql_query($sql);
if (
mysql_num_rows($query) > 0) {
echo 
"You already have appointment for that time slot";
}
else { 
//enter the data

$postedtime= value coming from the newly submitted form
tell me if that bunch of code helps.. coz i am lil unsure abt that AND coming in SELECT statement with WHERE
anyway if that doesnt help there can be a work around

Last edited by convinceme; 04-21-2006 at 01:54 AM..
convinceme is offline
Reply With Quote
View Public Profile
 
Old 04-21-2006, 03:19 PM Re: SIMPLE BOOKING SYSTEM
Ultra Talker

Posts: 264
Location: UK
Trades: 3
I could write the code for you if you like. PM if your interested.


Nick
__________________
UKTV Index

Please login or register to view this content. Registration is FREE

Comprehensive resource for UK Television
uktvindex is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to SIMPLE BOOKING SYSTEM
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.31003 seconds with 12 queries