473,396 Members | 1,875 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Help needed on time calculation

Hello,

I have to write a small script which allows users to select individual tracks from a music album.
Each track has a checkbox next to its title (to allow for multiple selections).
Each title also mentions the duration of the track.

I have to pass the values of the selected tracks to the next page and this second page should display the total duration of all selected tracks (as well as the individual titles and durations).

As I am definitely not a php guru and I am not sure how I can do this properly.

Is there any existing script that can give me clues?

Thanks,
Marc
Jul 22 '07 #1
2 1221
kovik
1,044 Expert 1GB
You'll need to familiarize yourself with the way that checkboxes are posted in the $_POST array, date and time manipulation to add the track times together, and you'll need to database all of the tracks individually.

A good way to organize your tables are to have three tables for the tracks:

1) One for the artists with an id and the artists' name
2) One for the albums with an id, the id of the artist that made it, and the album title
3) One for the actual tracks with an id, the id of the album it's in, the track title, and the track duration

PHP makes all of what you're after relatively easy (to me, at least), so as long as you keep it organize, you'll be fine.
Jul 23 '07 #2
Thanks a lot for your advice.
I'll try it...

Marc


You'll need to familiarize yourself with the way that checkboxes are posted in the $_POST array, date and time manipulation to add the track times together, and you'll need to database all of the tracks individually.

A good way to organize your tables are to have three tables for the tracks:

1) One for the artists with an id and the artists' name
2) One for the albums with an id, the id of the artist that made it, and the album title
3) One for the actual tracks with an id, the id of the album it's in, the track title, and the track duration

PHP makes all of what you're after relatively easy (to me, at least), so as long as you keep it organize, you'll be fine.
Jul 23 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Bob Mortensen | last post by:
I am working with large numbers of data sets and I need to automate the process of creating drive time zone excell spredsheet or Access outputs. Here is my challenge....I have two push pin sets,...
6
by: Code4u | last post by:
I need to design data storage classes and operators for an image processing system that must support a range of basic data types of different lengths i.e. float, int, char, double. I have a...
12
by: BC | last post by:
I have read the FAQ and the discussions but I am not a Javascript programmer and do not know how to make toFixed (and other techniques) work, after several attempts. The following calculations...
13
by: Fao | last post by:
Hello, I am having some problems with inheritance. The compiler does not not return any error messages, but when I execute the program, it only allows me to enter the number, but nothing else...
7
by: Siv | last post by:
Hi, I have a stored procedure that I want to execute and then wait in a loop showing a timer whilst it completes and then carry on once I get notification that it has completed. The main reason...
10
by: fj | last post by:
Windows 2003 Server. IIS 6.0 Website is running in separate application pool. I keep getting timeout problem. and the CPU is max 25%. The calculation runs more than 15 minutes. I tried to check...
10
by: 60325 | last post by:
This is the page where I collect the data in drop-down boxes with values of 1-10 and send it to a submitted page to do calculations. Example: Employee1 TeamScore(1-10) Employee2 ...
1
by: jonny | last post by:
Option Explicit Private mdTarget1 As Date Private mdTarget2 As Date ' called on form load Public Sub SetRecordStartTime() mdTarget1 = DateAdd("n", 60, Time) mdTarget2 = DateAdd("n", 120,...
1
by: news.microsoft.com | last post by:
I have a form field that accepts a start time and one that accepts an end time. I am using a masked editor that allows the user to enter the hour and minutes and am and pm. When I save the form...
6
by: Lara1 | last post by:
I'm trying to get certain cells to show a hovering alert message when I click on them. (I don't want an error-message style box to pop up, because I'll eventually want it to show for lots of cells...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.