Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 6 of 6
  1. #1
    Junior Member
    Join Date
    Mar 2010
    Posts
    17
    Member #
    21384
    So for some coursework i've got to design a database for my driving instructor and have it so users can book lessons and stuff

    The basic idea is that the person selects a date, then it will display a new page with all the times available for a week either side. In a drop down box, depending on what day you choose, it will then change the values in a second drop down box underneath for the available times.
    I will be able to use PHP to pull all the dates and times from the database, just need some javascript to do this i guess


    If i didn't explain that well, just say its Monday and the first half of the day is taken up
    Dropdown box 1 (list of selected date +- a week either side): Monday 21st March
    Dropdown box 2: 14:00, 15:15, 16:30...

    then you select Tuesday which is totally free
    Dropdown box 1: Tuesday 22nd March
    Dropdown box 2 changes to: 8:00, 9:15, 10:30...


    The code would need to work inbetween different boxes in a table.
    Thanks

  2.  

  3. #2
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    AJAX will get the job done. I use this all the time (albeit with ASP/ASP.net) for this purpose.

    You create a PHP page that will take a querystring (in this case, the date selected) and find all the free times. You output those times to an XML file and then read the XML file using the Javascript.

    jQuery will make your life a WHOLE lot easier if you can use it. It's great for AJAX calls.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  4. #3
    Junior Member
    Join Date
    Mar 2010
    Posts
    17
    Member #
    21384
    Thanks, but all i can use for the server side stuff is PHP, Apache, and MySQL. We've been tought PHP, but we've only been using it for like a year, so i don't really know anything about the other languages

  5. #4
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    You can use AJAX with PHP on the server side. AJAX = Asynchronous Javascript and XML. Which means it really should be called AJAXML I suppose, but it doesn't sound right.

    Basically, you're using Javascript to read PHP content outputted as XML.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  6. #5
    Junior Member
    Join Date
    Mar 2010
    Posts
    17
    Member #
    21384
    Ok then I'll give it a go

    Do you know what the code is??

  7. #6
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    Depends on how your database is set up. The only advice I can give you that way is the advice I've already given you.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Search tags for this page

word drop down boxes change in one changes another

Click on a term to search for related topics.
All times are GMT -6. The time now is 10:30 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com