Best way to display availability for the booking system
Hello
I currently have a form with a menu drop-down allowing users to select the number of seats that they would like to book.
Currently, the field reduced from 10 to 0 in conjunction with the number of seats available.
The problem is that I add another variable to the scenario whereby the same field will reduce if the parameter 'event' affirm that only a certain number of seats can be reserved per transaction.
There are 2 variables:
-$seats_available (that's the number of seats have not yet been booked)
- $row_prod_detail ['seats_per_booking'] (how many seats is allowed per transaction)
I tried to add an OR statement in the form field, but it returns 1-5 and 1-10, that everything in the menu dropdown-> resulting in 15 options.
Here's the code for form field:
< label for = "quantity" > < / label > < select name = "quantity" id = "quantity" class = "quantity_dwfield" > < option value = "-1" selected = "selected" > amount seats < / option > < option value = "-1" > - < / option > <? PHP if ($seats_available < = 10 | $row_prod_detail ['seats_per_booking'] < = 10) {? >} <? PHP if ($seats_available == 0 | $row_prod_detail ['seats_per_booking'] == 0) {? >} < option value = "" > No. seats left! < / option > <? PHP}? > <? PHP if ($seats_available == 1 | $row_prod_detail ['seats_per_booking'] == 1) {? >} < option value = "1" > 1 < / option > <? PHP}? > <? PHP if ($seats_available == 2 | $row_prod_detail ['seats_per_booking'] == 2) {? >} < option value = "1" > 1 < / option > < option value = "2" > 2 < / option > <? PHP}? > <? PHP if ($seats_available == 3: $row_prod_detail ['seats_per_booking'] == 3) {? >} |
< option value = "1" > 1 < / option >
< option value = "2" > 2 < / option >
< option value = "3" > 3 < / option >
<? PHP}? >
<? PHP if ($seats_available == 4 | $row_prod_detail ['seats_per_booking'] == 4) {? >}
< option value = "1" > 1 < / option >
< option value = "2" > 2 < / option >
< option value = "3" > 3 < / option >
< option value = "4" > 4 < / option >
<? PHP}? >
<? PHP if ($seats_available == 5: $row_prod_detail ['seats_per_booking'] == 5) {? >}
< option value = "1" > 1 < / option >
< option value = "2" > 2 < / option >
< option value = "3" > 3 < / option >
< option value = "4" > 4 < / option >
< option value = "5" > 5 < / option >
<? PHP}? >
<? PHP if ($seats_available == 6: $row_prod_detail ['seats_per_booking'] == 6) {? >}
< option value = "1" > 1 < / option >
< option value = "2" > 2 < / option >
< option value = "3" > 3 < / option >
< option value = "4" > 4 < / option >
< option value = "5" > 5 < / option >
< option value = "6" > 6 < / option >
<? PHP}? >
<? PHP if ($seats_available == 7 | $row_prod_detail ['seats_per_booking'] == 7) {? >}
< option value = "1" > 1 < / option >
< option value = "2" > 2 < / option >
< option value = "3" > 3 < / option >
< option value = "4" > 4 < / option >
< option value = "5" > 5 < / option >
< option value = "6" > 6 < / option >
< option value = "7" > 7 < / option >
<? PHP}? >
<? PHP if ($seats_available == 8 | $row_prod_detail ['seats_per_booking'] == 8) {? >}
< option value = "1" > 1 < / option >
< option value = "2" > 2 < / option >
< option value = "3" > 3 < / option >
< option value = "4" > 4 < / option >
< option value = "5" > 5 < / option >
< option value = "6" > 6 < / option >
< option value = "7" > 7 < / option >
< option value = "8" > 8 < / option >
<? PHP}? >
<? PHP if ($seats_available == 9: $row_prod_detail ['seats_per_booking'] == 9) {? >}
< option value = "1" > 1 < / option >
< option value = "2" > 2 < / option >
< option value = "3" > 3 < / option >
< option value = "4" > 4 < / option >
< option value = "5" > 5 < / option >
< option value = "6" > 6 < / option >
< option value = "7" > 7 < / option >
< option value = "8" > 8 < / option >
< option value = "9" > 9 < / option >
<? PHP}? >
<? PHP if ($seats_available == 10: $row_prod_detail ['seats_per_booking'] == 10) {? >}
< option value = "1" > 1 < / option >
< option value = "2" > 2 < / option >
< option value = "3" > 3 < / option >
< option value = "4" > 4 < / option >
< option value = "5" > 5 < / option >
< option value = "6" > 6 < / option >
< option value = "7" > 7 < / option >
< option value = "8" > 8 < / option >
< option value = "9" > 9 < / option >
< option value = "10" > 10 < / option >
<? PHP}? >
<? PHP}? >
<? PHP if ($seats_available > 0 | $row_prod_detail ['seats_per_booking'] > 10) {? >}
< option value = "1" > 1 < / option >
< option value = "2" > 2 < / option >
< option value = "3" > 3 < / option >
< option value = "4" > 4 < / option >
< option value = "5" > 5 < / option >
< option value = "6" > 6 < / option >
< option value = "7" > 7 < / option >
< option value = "8" > 8 < / option >
< option value = "9" > 9 < / option >
< option value = "10" > 10 < / option >
<? PHP}? >
< / select >
Any help would be much appreciated!
I've never actually created a loop in my life! I know; disappointing.
How would I go to do this? I saw a few tutorials, but none of them does solve several variables (the show something like 0-10, but not 10-0 as a default and change if one of the variable becomes less than 10)
The loop must:
- Show 1 to 10 if BOTH $availability AND $seats_per_person are MORE than 10
- Display 1-x if EITHER $availability OR $seats_per_person are below 10 (Eg. If $seats_per_person is limited to 3, then the loop will go from 1-3 If $availability is 1, then regardless of the cap $seats_per_person (out of 3) he only show 1)
EDIT:
That's what I got. It seems to work, but I'm doing something I shouldn't? like formatting / organizational wise?
Tags: Dreamweaver
Similar Questions
-
What is the best way to set permissions for the DNSAdmins?
If applied to the object in ADSIEdit adminsdholder MicrosoftDNS will reset permissions?
We want permissions to be consistent in the whole area and our areas our ineritting DNSAdmins not when we create them.
Hello
That your computer is under domain, you must contact the technet forum, where we have of the support technicians who are well equipped with the knowledge on the issues of domain, do visit the link provided below.
http://social.technet.Microsoft.com/forums/en-us/winserverfiles/threads -
Is it possible to connect a simple 1 d array to a digital indicator or what would be the best way to display the numeric values of the array on the front panel? Examples or suggestions would be greatly appreciated.
Thank you
Tunis
Thank you Adam, it's originally in a while loop, I placed it in a loop for example, wired County in the for loop and presto, this son of a digital indicator. It works very well. Thanks for the help folks.
-
I want to add content that changes in a civil way, such as 'thought for the day'. It can then display another text or an image on a proposed agenda. Is this possible? Robert.
Hello
If you have the code incorporated with you, then you can insert it in the Muse.
You just need to go to the page creation and go mode to "object > insert HTML code ', paste the embed code, and click OK.
Place the output area according to the requirement of you.
Concerning
Vivek
-
What are the best settings to standard calibration for the XBR65X850C?
What are the best settings to standard calibration for the XBR65X850C?
Hi DRATCLIFFE,
Thank you for your time to write a post.
We are very sorry for the late reply.
Change the picture or the sound settings of your TV depends on your preferences and on what you watch/listen to.
You can use the settings preset for image and sound.
In addition, to better enjoy your viewing experience, follow these steps:
- Install the latest software update. The updated software and the driver for your Sony product are available online.
- Set the automatic software download setting to automatically download software updates.
Thank you
^ RonIf my post answered your question, please mark it as "accept as a Solution.
-
Hi OTN community.
My query is on Oracle team Persistence framework (http://www.ateam-oracle.com/going-mobile-with-adf-implementing-data-caching-and-syncing-for-working-offline/).
It is available for the MAF and it is an approach recommended by Oracle for the implementation of data synchronization?
Can anyone please share their experience using this extension.
We are currently reviewing the best approach for the implementation of data synchronization.
Best regards
Deepak
See: persistence of the MAF Oracle for SQLite
Frank
-
What plans are available for the use of the storage cloud at adobe. What is the authorized space if I free plan.
Thank you
Agoutin
Hi rajthkr,
Acrobat.com offers free online storage for up to 5 GB of data (there are on the plans at this time to provide additional storage for a fee).
Best,
Sara
-
What is the best way to upgrade versions of the agent on linux remote or solar
What is the best way to upgrade versions of the agent on linux remote or solar systems.
Is it possible once new versions of the agent software is downloaded to clients to upgrade
customers without logging in each of them.automate, automate, automate.
I would use SSH keys and a quickie shell script to do the job for me.
#! / bin/sh
HOST = ' 'host_list cat.
for host in ${HOST}
do
echo ' SCP'ingto ${host} ".
SCP o ConnectTimeout = 5. tar.gz hyperic@${host}:/home/hyperic/
echo ' work on ${host} ".
SSH o ConnectTimeout = 5 hyperic@${host} ' / home/hyperic //hq-agent stop'
SSH o ConnectTimeout = 5 hyperic@${host} ' cd/home/hyperic; "tar - zxvf. tar.gz.
SSH o ConnectTimeout = 5 hyperic@${host} ' / home/hyperic //hq-agent start' If [$?-no 0]
then
echo "${host} - agent was able to start.
FI
fact -
What are the different types of tools available for the siebel file cleaning
Hi all
Please let me know what are the different types of tools available for siebel file system cleaning.
Thanks in advance
Remyassuming that you have installed the Siebel server under d:\D:\dba81
CD D:\sba81\siebsrvr\bin
(1) mode considered
sfscleanup.exe/u SIEBEL-USER /p /C SIEBEL-word of PAST SIEBEL-DATA-SOURCE /d SIEBEL-OWNER of the TABLE/f SIEBEL-LEADER-SYSTEM/m SIEBEL-FILE-SYSTEM-FOR-INCORRECT_FILES/r Y/x 'D:\sba81\siebsrvr\log\sfscleanup_report.log '.(2) actual performance
Replace/r Y, N/rBest regards
EvtLogLvl -
Unable to display data for the date where there is no entry in the table
Hello
I need a urgent, described below:
I have a table named as 'dirty', consisting of three columns: empno, sale_amt and sale_date.
(Please ref. The table with data script as shown below)
Now, if I run the query:
"select trunc (sale_date) sale_date, sum (sale_amt) total_sale of the sales group by order trunc (sale_date) by 1.
It then displays the data for the dates there is an entry in this table. But it displays no data for the
date in which there is no entry in this table.
If you run the Table script with data in your schema, then u will see that there is no entry for the 28th. November 2009 in
sales table. Now the above query displays data for the rest as his dates are in the table of the sale with the exception of 28. November 2009.
But I need his presence in the result of the query with the value "sale_date' as '28. November 2009 "and that of"total_sale"as
« 0 ».
Y at - there no way to get the result I need?
Please help as soon as POSSIBLE.
Thanks in advance.
Create the table script that contains data:
------------------------------------------
CREATE TABLE SALE
(
NUMBER EMPNO,
NUMBER OF SALE_AMT
DATE OF SALE_DATE
);
TOGETHER TO DEFINE
Insert into SALES
(EMPNO, SALE_AMT, SALE_DATE)
Values
(100, 1000, TO_DATE (DECEMBER 1, 2009 10:20:10 ',' DD/MM/YYYY HH24:MI:SS'));))
Insert into SALES
(EMPNO, SALE_AMT, SALE_DATE)
Values
(100, 1000, TO_DATE (NOVEMBER 30, 2009 10:21:04 ',' DD/MM/YYYY HH24:MI:SS'));))
Insert into SALES
(EMPNO, SALE_AMT, SALE_DATE)
Values
(100, 1000, TO_DATE (NOVEMBER 29, 2009 10:21:05 ',' DD/MM/YYYY HH24:MI:SS'));))
Insert into SALES
(EMPNO, SALE_AMT, SALE_DATE)
Values
(100, 1000, TO_DATE (NOVEMBER 26, 2009 10:21:06 ',' DD/MM/YYYY HH24:MI:SS'));))
Insert into SALES
(EMPNO, SALE_AMT, SALE_DATE)
Values
(100, 1000, TO_DATE (NOVEMBER 25, 2009 10:21:07 ',' DD/MM/YYYY HH24:MI:SS'));))
Insert into SALES
(EMPNO, SALE_AMT, SALE_DATE)
Values
(200, 5000, TO_DATE (NOVEMBER 27, 2009 10:23:06 ',' DD/MM/YYYY HH24:MI:SS'));))
Insert into SALES
(EMPNO, SALE_AMT, SALE_DATE)
Values
(200, 4000, TO_DATE (NOVEMBER 29, 2009 10:23:08 ',' DD/MM/YYYY HH24:MI:SS'));))
Insert into SALES
(EMPNO, SALE_AMT, SALE_DATE)
Values
(200, 3000, TO_DATE (NOVEMBER 24, 2009 10:23:09 ',' DD/MM/YYYY HH24:MI:SS'));))
Insert into SALES
(EMPNO, SALE_AMT, SALE_DATE)
Values
(200, 2000, TO_DATE (NOVEMBER 30, 2009 10:23:10 ',' DD/MM/YYYY HH24:MI:SS'));))
Insert into SALES
(EMPNO, SALE_AMT, SALE_DATE)
Values
(300, 7000, TO_DATE (NOVEMBER 24, 2009 10:24:19 ',' DD/MM/YYYY HH24:MI:SS'));))
Insert into SALES
(EMPNO, SALE_AMT, SALE_DATE)
Values
(300, 5000, TO_DATE (NOVEMBER 25, 2009 10:24:20 ',' DD/MM/YYYY HH24:MI:SS'));))
Insert into SALES
(EMPNO, SALE_AMT, SALE_DATE)
Values
(300, 3000, TO_DATE (NOVEMBER 27, 2009 10:24:21 ',' DD/MM/YYYY HH24:MI:SS'));))
Insert into SALES
(EMPNO, SALE_AMT, SALE_DATE)
Values
(300, 2000, TO_DATE (NOVEMBER 29, 2009 10:24:22 ',' DD/MM/YYYY HH24:MI:SS'));))
Insert into SALES
(EMPNO, SALE_AMT, SALE_DATE)
Values
(300, 1000, TO_DATE (NOVEMBER 30, 2009 10:24:22 ',' DD/MM/YYYY HH24:MI:SS'));))
COMMIT;
Any help will be necessary for me
Kind regardsWITH tab AS (SELECT TRUNC(sale_date) sale_date, SUM(sale_amt) total_sale FROM sale GROUP BY TRUNC(sale_date) ORDER BY 1 ) SELECT sale_date, NVL(total_sale,0) total_sale FROM tab model REFERENCE refmodel ON (SELECT 1 indx, MAX(sale_date)-MIN(sale_date) AS daysdiff , MIN(sale_date) minsaledate FROM tab) dimension BY (indx) measures(daysdiff,minsaledate) main main_model dimension BY (sale_date) measures(total_sale) RULES upsert SEQUENTIAL ORDER ITERATE(1000) until (iteration_number>refmodel.daysdiff[1]-1) ( total_sale[refmodel.minsaledate[1]+iteration_number]=total_sale[cv()] ) ORDER BY sale_date
using a clause type
Ravi Kumar
-
Are there any available for the Mac Pro 2013 SSD expansion?
Are there any available for the Mac Pro 2013 SSD expansion?
I would like to increase my 1 or 2 GB of storage internal if possible.
-
HP Workspace: What plan options are available for the HP workspace?
Hey everybody,
Plan options are available for the HP workspace?
Thank you
Bill
HP workspace is a service of application with the application testing virtualization and delivery provided trained HP Workspace Service Desk officers lighten the load for a client by THIS group. HP workspace is available in two service options - essential and Premium.
Essential is a great solution for organizations that have the most mobile that need to be in "desktop mode" using Windows or the Web for business applications of less than a few hours a day. Premium provides additional virtualized applications, more cloud computing power and overtime for the users who need to use applications in desktop mode more frequently. With each service, there is an integration of VPN service option (sold separately). The VPN service allows a secure access to data and databases behind the corporate firewall.
Plan options HP workspace at a glance:
Essential
Premium
The Service module
Monthly usage (per user)
40 hours
80 hours
integration of VPN 1 year
Cloud (per user), the processing power
VCPU dedicated
VCPU dedicated
Licensure is through gateway VPN - no per user
RAM to the virtual machine (per user)
4 GB OF RAM
8 GB RAM
Virtualized applications
≤10
Unlimited
The application analytics
—
Detailed usage reports
Support
Incident and Monday to Friday deployment support[1]
Mon - Fri deployment and incident support.7
-
best way to transfer photos from the iMac on external hard drive
best way to transfer photos from the iMac on external hard drive
If you are mobile loose photo files, drag them in here and if you are going to be removed from the inside, keep a copy on a second disc.
If you move an iPhoto, Aperture, or photo library, make sure that the external hard drive contains a volume to the Mac OS Extended format, drag the library there, launch the application with the key Option key, choose it, confirm that it works and if you are going to be remove from the inside, keep a copy of it on a second disc.
(140309)
-
This system is available for the last update
This system is available for the update for the last update: Mac OS X 10.6 Snow Leopard?
Depends on what model of Mac you have. Choose about this Mac from the Apple menu, click details and compare the identifier of the model with the following, which are the first Macs of each type that can execute the Cougar and newer:
iMac7, 1
MacBook5, 1
MacBookPro3, 1
MacBookAir2, 1
Macmini3, 1
MacPro3, 1
Xserve3, 1
A Mac older than those listed including the Core 2 Duo (not Core Duo) or better CPU and at least 2 GB of RAM can run 10.7 Lion, which is available by clicking here. No more recent than 10.6.8 operating system supports the PowerPC software such as Microsoft Office 2004.
(138837)
-
When 4.4.3 update will be available for the India?
On 03.06.2014, Motorola announced 4.4.3 for users of bike E, but still it is not available for the India. Can Motorola tell us when it will be available for Indian users?
Second, there was a report on the internet that has a wifi bug is still present on the update released by Motorola?
No, we cannot provide details or calendar. We are working on.
Maybe you are looking for
-
Numbers of wired keyboard has stopped working
I have a keyboard attached to a wired Macbook Pro Apple. The keyboard worked fine for a year apart from the occasional glitch when it stops working, I add an extension of cable and it starts working again. However, all of a sudden the numbers on the
-
Tecra M2 - cannot install drivers Intel/PRO Wireless 2100
I have a Toshiba Tecra M2. Drivers Toshiba page for my model lists an update driver for this PC as follows: Driver Lan Wireless 19/12/05Intel Windows XP 9.0.2.31 World Wide I don't seem to be able to install it, even though I have an Intel/PRO Wirele
-
iPhone 5 c. I turned it off one night and then when I went on the morning tuirn, the apple icon came and disappeared for a few seconds. He continues to repeat this until the phone is running out of charge. When I plug it into a wall charger, it immed
-
Based reading Serial and example of writing used in a graph
Reading and writing labview example I get responses like '250 v' and "v 3000". How to make just the "250" and "3000", as the right type of data, put in a table or a chart? All opinions are appreciated. Thank you!
-
KB978637 systems will not install.
Update for Windows 7 for x 64-based systems KB978637 will not be installed. Error code 80070057. Have tried and failed to set up since 30 March