Results 1 to 6 of 6

Thread: Date Availability Checker Script

  1. #1
    Join Date
    May 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy Date Availability Checker Script

    Hi, I love DD, it's a wonderful resource that I have used many times. Ok enough of the sucking up...

    I'm an artist and I use the web a lot for promoting and such like, now I've had a few clients ask me if there is any way to put a date checker onto my site, I said I'd look into it.

    I'm so poor at coding it's unreal so I fall at your feet here and ask you take pity on a poor sad little girl... Please, Please could anyone code a date checker script and tell me how to use it...

    You will have my undying gratitude not to mention that of my clients.

    Yours, hoping... Michelle.

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Well, this is a lot more complex than just checking a date. That would likely be just one line of code.
    But creating the system to store the calendar of events including the management end of things to add events in the first place, then add an event through this date checker if it is free, etc. would get complex.

    Do you already have a system in place, or would you need that as well?

    Even if you do have the system in place, it may be difficult to alter it, since the code might be complex as well.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    May 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I don't have anything in place at the moment, All I need really is to have a flat file? with the dates already booked in it and then a form to check to see if that date is already in the file and send back a sorry page if it is and a congratulations page if it isn't.

    Sounds simple, but I imagine is probably isn't. I've been on w3schools to try and learn the basics but I just can't get my head around it

    Thank you for replying
    Yours, Michelle

  4. #4
    Join Date
    Feb 2007
    Location
    🌎
    Posts
    528
    Thanks
    10
    Thanked 10 Times in 10 Posts
    Blog Entries
    2

    Default

    You can easily write the date and time (without the calendar):
    Code:
    <script type="text/javascript">var date = new Date(); document.write(date)</script>
    ....(o_ Penguins
    .---/(o_- techno_racing
    +(---//\-' in
    .+(_)--(_)' The McMurdo 500

  5. #5
    Join Date
    May 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you techno but that' not quite what I was looking for

  6. #6
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    That script in fact does nothing. It just prints the current date on the page, using javascript. No server side tracking of anything, no options, just placing it there.

    Well, you could just use PHP and write to a file for each timestamp (number of seconds since 1970; the official way to save a date) that is taken, then add if it isn't, so it's now reserved.
    Seems silly to me, when you should look into a database setup so you can keep track of all of it, by person, IP, whatever.

    http://php-mysql-tutorial.com if you want to look into that.

    For basic file writing (like with a .txt file) go to www.php.net and search "fwrite", "fread", and "fclose" to see how that loop works.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

Bookmarks

Posting Permissions

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