Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Booking Code


i cant even get it to work in the browser at the moment it gives me the error:

Parse error: parse error, unexpected T_ELSE in C:APACHE2Apache2htdocsadd_book.php on line 91

which is the else in the lines which is before the form starts:

else {
$accommid = $_POST['accommID'];

i have confused myself completly with all the if's and elseif's and the brackets that go with each. however i am trying to do a booking script that will search to see if the dates that the users have entered are avaialable for a particular accommodation.

also i need to be able to solve the concurrent user problem to ensure that an accommodation cant be double booked. Code:




View Complete Forum Thread with Replies

Related Forum Messages:
Booking
I have a system to for booking books online. I have start date,end date, start_time and end_time.

I'cant figure out how to validate those fields not to book one book 2 times in same time.
For example if the book is already booked than you get message this book is already booked
Any idea?

View Replies !
Booking System
I just wrote an incredibly complicated bookings system for a client, it worked marvelously. implemented in a cms & everything. The problem is: I needed to allow for cross year bookings, so I tried to implement that, thinking it would be easy. think again. The whole things gone gaga. Like the absolute moron I am, I didnt save it.

does anyone have a suggestion for a script I can leech? Im desperate, ill lose my job if the presentation doesnt go off smoothly. I cant pay anyone, but id help anyone if they had a problem like this.

View Replies !
Booking Dates
I'm familiar with easy php/mysql-applications, but i've run into a problem now. I'm trying to build a booking system(for training purpose), and I'm kind of stuck when it comes to this:

* each booking record in db has a "from" and a "to" date(DATE format)
* how can i return available objects when a user searchs for "available objects from 2006.01.01 to 2006.03.01 ?

View Replies !
Booking Purpose
I need to do a functionb of select seat for booking purpose using php. This function is like we can choose or select the seat when we make movie tickets reservation online.

View Replies !
Booking System
I am trying to do a booking system concerning my project at the university(using PHP &MySQL)I am hasving the following problem: Code:

View Replies !
Simple Room Booking App?
I'm lazily looking for a simple app that will let us match up
teachers, classes, and instructors, preferably with a php/mysql
infrastructure so that it's accessible via the web. If there is a
single good repository of free scripts that would be useful as well.

View Replies !
Ticket Booking System
I am prototyping a ticket booking system and just wanted to ask a few
questions.

1 - What is the standard way of temporarily reserving a number of
tickets throughout the purchasing process (to stop other people
reserving those seats or whatever).

2 - What do you do to release these 'seats' if someone closes their
browser? Is it just a cron job set for every 20 mins?

I am sure I have seen a solution to this before but can't find it now.

View Replies !
Room Booking System
Loooking for a simple script to help reserve rooms in a building, 10 rooms where some times are booked week - on - week and also have two diffrent time tbale weeks?

View Replies !
Reservation / Booking Scripts
I have been looking for some time for a php/MySQL booking / reservation scripts for a tourism business. Bughotel is the right type of thing but a little top heavy. Any others out there people might recommend. I have done some pretty intensive searches at sourceforge et al.

View Replies !
Script To Allow Booking Of A Timeslot
I'm trying to write a script to allow booking of timeslots between 6am and 6pm - 1 min intervals. Only 1 owner per slot. Once their booked - they're gone.
Here's where I'm at -

Database called time - 2 tables called timeslot (time_id,time) and owner(owner_fname,owner_lname,email,time_id). Code:

View Replies !
Online Booking Calender
I wanted to put a calender on my website to allow people to see up coming clasess we have and allow them to booking/pay for them also. I would add them in the back end and how many spots are availble and when someone clicks on to pay for the class and checks out all the way it would subtract it from the total amount.

I would also like it to show on the date when all spots are gone Sold out and when only one is left only 1 spot left. I would like to see if there is a script out already that does this now. I am new to php/mysql so it would be great to find this.

View Replies !
Online Booking System
I've been scouring the web for an example, but just need pointing in the right direction. Ultimately I want to do this myself, just a simple booking system is required.

Essentially how the system works is that when someone comes to the show they need a website assessing. The first stage is to select an engineer which will carry out the assessment.

Once you have done this a screen appears with the available time slots with text fields which needs to be completed for that specific engineer to fill in the site requirements.

An idea perhaps is to create an online calender which I've already coded so that they can click on a specific date, and on the same page the time slots available.

View Replies !
Online Hotel Booking System
I want to build an online hotel booking system, where by people can book hotels online and make payment with a credit card. There will be extra goodies for registered members.

I want idea of how to go about this especiall with the online payment with the credit card. Online payment with credit card is something i honestly have no idea of it. I will be grateful if i can get explanation how to implement such a system or sample script.

View Replies !
Compare Two Dates In A Booking System
i want to compare two dates called booking_start_date and booking_end_date to make sure that the booking start date comes before the booking end date. at the moment both dates are just stored as dates in the mysql database. anybody know how i could do this?

and also does anybody know how i can find the number of days that the booking is for based on the dates that the user has entered as it will be needed for me to calculate the price of their overall booking.

View Replies !
Wanted: Open Source Php Course Booking System
we are looking for a slim open source course booking system with the
following features:
* users can enroll for courses, cancel their bookings
* maximum number of participants
* administrator's pages: list of participants and their contact details
(email, phone etc.)

So far, we have found an extension to the mambo CMS
http://mamboxchange.com/projects/akreservations/
and a rather smaller application (privately developed)

However, are there better alternatives?

Desired features:
* open source
* currently active development
* as "slim" as possible (mambo is quite a heavy weight!), may be even
without using a mysql database (like for example the slim version 1.x
of the gallery php application).

View Replies !
Online Booking System For The Apartments And Hotels
I am looking for online booking system for the apartments and hotels and i can not find that.

View Replies !
Calculation Problem - On-line Holiday Booking
I have a calculation problem in this system i am doing for on-line holiday booking. Rates are given for a particular date range as follows in the "rate" table:

E.g.
$10 for 2005/10/01 - 2005/10/05
$20 for 2005/10/05 - 2005/10/10

If client wants to travel from 2nd to 9th, the cost should be $120.00 Calculation:

2nd to 5th @ $10 per day = $40
6th to 9th @ $20 per day = $80


View Replies !
Checking Room Availability For Hotel Booking System
I was wondering if anyone could help me with a problem I'm having.
I've been using Dreamweaver to create a hotel booking system for a
friend of mine, using MySQL (version 4.0.21) and PHP 5. The bit I'm
struggling with is checking the Room Availability based on dates that
are typed into a textfield and then returning a list of the available
rooms on the next page.

The three tables involved in this function are:

CREATE TABLE `room` (
Room_Number tinyint(1) UNSIGNED NOT NULL,
Price_Double_per_Night decimal(5,2) NOT NULL,
Price_Twin_per_Night decimal(5,2) NOT NULL,
Price_Single_per_Night decimal(5,2) NOT NULL,
Price_Double_per_Week decimal(5,2) NOT NULL,
Price_Twin_per_Week decimal(5,2) NOT NULL,
Price_Single_per_Week decimal(5,2) NOT NULL,
PRIMARY KEY(`Room_Number`),
)
TYPE=InnoDB
ROW_FORMAT=fixed;

CREATE TABLE `room_booking_link_entity` (
Room_Number tinyint(1) UNSIGNED NOT NULL,
Room_Booking_ID int(11) NOT NULL,
Single_Double_Twin enum('Single','Double','Twin') NOT NULL,
PRIMARY KEY(`Room_Number`, `Room_Booking_ID`),
INDEX `Room_Number`(`Room_Number`),
INDEX `Room_Booking_ID`(`Room_Booking_ID`),
FOREIGN KEY `Reference_14`(`Room_Number`)
REFERENCES `room`(`Room_Number`)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
FOREIGN KEY `Reference_85`(`Room_Booking_ID`)
REFERENCES `room_booking`(`Room_Booking_ID`)
ON DELETE NO ACTION
ON UPDATE NO ACTION
)
TYPE=InnoDB
ROW_FORMAT=fixed;

CREATE TABLE `room_booking` (
Room_Booking_ID int(11) NOT NULL AUTO_INCREMENT,
Customer_ID int(11) NOT NULL,
Bill_ID int(11) NOT NULL,
Date_of_Arrival date NOT NULL,
Date_of_Departure date NOT NULL,
Number_of_Nights tinyint(3) NOT NULL,
Date_Booking_Made date,
Status_of_Booking enum('Booked','Arrived','Departed') NOT NULL,
Total_Cost decimal(7,2) NOT NULL,
PRIMARY KEY(`Room_Booking_ID`),
INDEX `Room_Booking_ID`(`Room_Booking_ID`),
INDEX `Customer_ID`(`Customer_ID`),
INDEX `Bill_ID`(`Bill_ID`),
INDEX `Date_of_Arrival`(`Date_of_Arrival`),
INDEX `Date_of_Departure`(`Date_of_Departure`),
INDEX `Status_of_Booking`(`Status_of_Booking`),
FOREIGN KEY `Reference_03`(`Customer_ID`)
REFERENCES `customer`(`Customer_ID`)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
FOREIGN KEY `Reference_14`(`Bill_ID`)
REFERENCES `bill`(`Bill_ID`)
ON DELETE NO ACTION
ON UPDATE NO ACTION
)
TYPE=InnoDB
ROW_FORMAT=fixed;

I've just discovered that MySQL 4.0.21 does not support subqueries.
I'm basically stuck with this version of MySQL. I think I've got
round the subquery problem by using a multi query option as follows:

1.Create a temptable that will store all of the room numbers that
have bookings for the particular dates requested as follows:

SELECT DISTINCT a.room_number INTO temptable
FROM booking_link_entity AS a INNER JOIN room_booking AS b
WHERE b.departure_date >$_POST[‘ARRIVAL'] And b.arrival_date <
$_POST[‘DEPART'];

2.Left join this with the room table and pull out rows with no match

SELECT a.room_number, b.room_number
FROM room AS a LEFT JOIN temptable AS b ON a.room_number=b.room_number
WHERE b.room_number IS NULL;

3.Delete temp table

I've tried doing this in Dreamweaver, but to no avail. I have a
feeling it is too complex for Dreamweaver.

My php knowledge is very basic and was wondering if anyone could give
me some pointers as how to do this in PHP?.

View Replies !
Mail Problem - Online Booking System For Equipment.
I am writing an online booking system for equipment. I want to be able to
automatically email those who have booked equipment, say one or two days
before to remind them of their booking. Does anyone have any ideas of how I
could do this (I am familiar with the mail() function in PHP).

View Replies !
Command-line Php Displays Code Instead Of Executing Code
I am using CLI PHP to run a PHP script, c:wampphpphp.exe, but
instead of executing my script, it's actually displaying the raw code
instead.

How can I run my code using CLI PHP? I installed WAMP5 on WinXP.

View Replies !
Code To Read Code In Web Page's Source
Does anybody know how one can supply a URL to a PHP script and have it search for specific code in that web page?

View Replies !
Old Code Vs New Code - Language Syntax Change?
I've recently begun programming PHP again and have found my old code doesn't work anymore. It's been a few years since my code was written, and simple functions don't seem to be working. I've done a bit of research into the syntax again and found the following;

I used to use a function as such;

if ($REQUEST_METHOD=="POST") {
Now I've seen alot of the syntax is
if ($_SERVER($REQUEST_METHOD=="POST")) {
And referencing variables from the form is as such;
$_POST['variable']

Where previously I could reference them in the simple form; $variable

Has there been a language syntax change that would cause my old code to be obsolete? Is there a configuration line that could be changed to allow this old code to work?

View Replies !
Regular Expression :: Format Anything Within &lt;code&gt; And &lt;/code&gt;
Any regular expression wizards out their tonight? This is driving me crazy...trying to take a string full of HTML and format anything within the <code></code> tags using highlight_string().

$string = "<strong>This</strong> is some HTML!!!<code>echo "Hello, World!";</code>No more code!!!";
$pattern = "(<code>)*(</code>)";
$replacement = "";

$string = eregi_replace($pattern, highlight_string($replacement, true), $string);

*Thought that would work, but I know regular expressions are NEVER that easy. An hour later...

View Replies !
BB Code - Escape A Bracket In BB Code?
Is there a way to escape a "bracket" in BB code? The beginning of a bbcode
post I made starts with something in brackets [like this]. This causes a
strange thing to happen to the remainder of my post. Removing the brackets
makes my post normal. That shows me that I need to escape the brackets.
However, a simple backslash does not seem to do the trick i.e. this [wont
work]

I am not the administrator of the bb forum, just a poster. So I need to know
what to do on my end (as opposed to an adiministrator's power to
reconfigure, etc.

View Replies !
Translate Perl Code To PHP Code.
Can some one transfer this Perl into PHP? It is from the Spreadsheet-WriteExcel. PHP Code:

View Replies !
Convert Code Into Javascript Code
i have this php code:

header("Location: merge_cart.php?oldsession=" .urlencode($cart["sessionId"]));

now i want to convert this code into javascript code in php echo statement

e,g echo (" windows.location(......php) ");

does anyone knows how to do that.

View Replies !
Zip Code, Post Code, Town
does anyone know where i could get a MySQL db with postcodes and then towns that those postcode correspond to? i think this goes in php because i will develop all of my search in php.

View Replies !
Code To Display My Code
I am taking a class in PHP and thought that it would be nice to display
the PHP code that generated my pages when the user clicked a link (or
submit button). I have seen page that will display the underlying HTML
on the page and it would be a nice touch...

View Replies !
Executing A Php Code Within A Code
i'm making a search option in our website but the thing that makes it hard is that
when the result of the search is only 1 it must automatically execute the a page it locates..unlike when the result yields multiple result all you have to do is link the results..

View Replies !
Using Preg_replace() For [code][/code]
I'd like to be able to something similar to what codingforums does with the script.
however, i can't get mine to work..

I'm somewhat new to php, and I'm starting to understand the patterns, but mine obviously isn't correct.

I have this so far:

[code]
<?php
$text = preg_replace( "/[code](.*?)[/code]/","<table><tr><td>1</table>",$text);
?>

View Replies !
Html Code Within Php Code
How can I insert HTML code from within a php statement?

eg

if validation
{
html code snippet to display message
}else{
HTML Code snippet to display error page
}
}

View Replies !
Adding Php Code Or To Include A Page With Php Code Into A .tpl Page
how would i do this, i am intergrating a phpbb forum system into my site!

View Replies !
BB Code
i am making my own forums and i've got everything working pretty good except the bb code. i can get the easy ones like bold and emails but ones like 'url=index.php'Test'/url' (' = [ and ]) confuse me. i could get it if it was just url= or just plain url but when it can be either one i can't get it to work right.

View Replies !
How To Add A Pop-up Code To Php
cecho"<script>"
. "function openpopup()"
{
. "var popurl="clip.html""
. "winpops=windows.open(popurl,"",width=640,height=480,toolbar,directories,scrollba rs,"
}
. "</script>"Hi,
˙. "</script>"Hi,
s.open(popurl,"",width=640,height=480,toolbar,directories,scrollba rs,"
in.php?op=modules">"._ADDAHOME."</a> ]</center>";

View Replies !
GPS, Zip Code DB
I am searching for a database that I can write a PHP
application against. I am not looking for bulky packages, or anything
fancy or maps, ... just some raw SQL data I can mix & match from
tables, ... stuff like Zip codes, Latitude and Longitude, and any
other basic address & coordinate info. I can cross reference and tie...

View Replies !
SSL Php Code
I am using linux, php and trying to do some ssl code. I want to send some identifier that connects my database to the client browser. I was looking into a secure cookie. I only want the page accessed over a SSL connection. Whats the best way to insure the clinet browser can only see my
page if they are ssl connected to it? In adding a 1 to the end of my send cookie code, it sends the cookie regardless of if they are ssl connected or not.

View Replies !
Zip Code
I have a database of zipcodes with latitude and longitude. I also have the
method of calculating the distance between two zipcodes. What I want to
know is if there is an efficient algorithm for obtaining the zip codes
within a specified distance of the first zipcode without having to retrieve
and calculate for every record in the database.

View Replies !
Zip Code From IP
I found this on the internet in a process of grabbing weather from weather.com and it uses the IP to trace back the closest zip code. It looks up the whois info in arin.net and once, worked correctly. I was wondering if anyone knew why it no longer grabs the correct zip code. I don't want the weather anymore but rather just the zipcode. Code:

View Replies !
Code?
This is straight out of a book I'm reading to learn PHP. I'm thinking
maybe I set either apache or PHP up incorrectly on my computer.
Simpler PHP's snippets work fine so I just don't know. Could someone
look this over and see if I have a problem?

<?php
function printColor($text,
$color="black", &$count=NULL)
{
//print the text with style
print("<span style="color: $color">" .
"$text</span>");

//if given a count, increment it
if(isset($count))
{
$count++;
}
}

//call with one argument
printColor("This is black text");
print("<br>
");

//override default color
printColor("This is blue text", "blue");
print("<br>
");

//pass in count reference
$c = 0;
printColor("This is red text", "red", $c);
print("<br>
");
printColor("This is green text", "green", $c);
print("<br>
");
print("Count: $c<br>");
?>

View Replies !
PHP Bug (or My Bad Code)?
Consider this code:

<?
$mask_n = (pow(2,32) - (pow(2,32-24)-1));
printf("%x
", $mask_n);
?>

On PHP 4.1.2 it prints:

ffffff00

On PHP 4.3.10 is prints:

ffffff01

Both versions of PHP are the standard Debian packaged versions (4.1.2
from Woody, 4.3.10 from Sarge)

tecra# php -v
PHP 4.3.10-9 (cli) (built: Mar 6 2005 17:45:14)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies

admin# php -v
4.1.2

Results are (predictably) the same under both the CLI version and under
the Apache module.

Is this a bug in PHP, or is there something broken in my code?

View Replies !
Php Code In A .gif?
I have heard of it being done, But i cant quite figure out how its done. I would like to make a .gif that would maybe have a mail() or something in it.

View Replies !
Add Code To My Code
I have a good file exists code and want to add it to a different file, i tried several times but i get coninual errors. Could someone please help me and paste my code into my full file, i promise to learn from your work. i know it should be simple but im a bigginer to php. Code:

View Replies !
Add Code To Code
how i can add code 1 to code 2 witch is below?what im trying to do is have a banned email code so when some one signs up it will say the email has been banned i have a table in my database with the list of emails that i want banned its called banned_emails and iin the banned emails table its called banned_email that is where the emails are Code:

View Replies !
Run The Code More Than Once...
I am trying to get my code running more than once when a user submits their form.
For example, when a user vists the page called "search", then can enter a number between 1 and 100. Once they hit submit, I want the code to run completely, x amount of times, depending on what the user requests.

View Replies !
Code For This
Say I wanted to create a comprehensive product code based on what the product in the database is called. Therefore I'd like:

"Blue Widget in Cotton"

to become:

"BLUEWIDGETCOTTON"

I can get rid of the space and "in"'s using str_replace but is there any code that will turn it into all capitals?

View Replies !
Mdb Code
Could some body be so kind to convert the following code so that it works with mysql

<?php

$sql="SELECT * FROM Admin";
$rs=odbc_exec($conn,$sql);
if(!$rs)
{
exit("Could not retrieve script settings.");
}
odbc_fetch_row($rs, 0);

?>

I have tried but keep getting errors

View Replies !
Fax Code
I know you can send an email VIA php but can you send a fax in the same way?

What I would like to do is have a fax sent to a designated number everytime an order is completed on my shopping cart program.

Any ideas on where to find a tutorial or general information about faxing VIA the internet. I don't want to pay a subscription/mo, i want to develope the code to send it right from my server, no 3rd parties involved. If you have ever done business, you know that the more parties involved the more hassles there are.

View Replies !
How To Code In Php ?
Many times i need to open certain file ( for 100 times )from ftp and correct errors.
How can i do this localy ? How can i test it so that its operating like on remote server ?
Question, work off-line, all finished - upload to server. Code:

View Replies !
Using PHP Code
i am sending mail using php code "mail()". It is working for usal mail accounts. But when i send to gmail account, it make problems. Gmail does n't resolve my header formats. The html code also shown to the viewer. How can i resolve this issue.

View Replies !
My First PHP Code
My first code of PHP when I run from the browser gives me blank screen. The code is

<html>

<body>

<?php

$myvar = "Hello World";

echo $myvar;

?>

</body>

</html>

I am using apache server. Please tell what to do.

View Replies !
This Code
$antroj=0;
$dtctxsz1 = $_POST["dtctxsz1"];
if($dtctxsz1 == 0){
print $dtctxsz1;
$antroj = $antroj + 1;
}

It adds 1 to $antroj even when the value of $dtctxsz1 is not 0. I have spent 7 hours on this one problem. Its driving me nuts.

View Replies !
Get The Code
can any one provide me the code? or where can i get the code for massive online games websites.

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved