Hi Neil,

thank you so much for your advice! i have not programmed XML before so it
will take me a while to learn it.. your suggestion sounds really fantastic,
expecially the part when i don't even have to ask the users to direct me to
the file that i need..

my problem, simply put will be:
1) user has to enter details in a form
2) when user enters HotelCode in one of the fields in the  form,
3) javascript must pass the value to PHP to search for the HotelName,
HotelAddress, HotelTel etc..
4) and then PHP pass the fetched variables back to javascript
5) javascript place those values in the respective fields
6) user continues to complete the form

through many of the help from people on this list and on the web, i think
maybe i can:
1) create a frame and write my PHP query statements in it
2) set a cookie when the user enters the HotelCode
3) reload the frame with the PHP code and get the variable with $_COOKIE
4) on the same frame, echo the fetched variables into javascript fields

have not try this out yet.. but if anyone has any thoughts, would love to
hear it!

thanks much,

----- Original Message -----
From: "Neil Smth" <[EMAIL PROTECTED]>
Sent: Wednesday, November 19, 2003 6:28 AM
Subject: Re: Re: [PHP-DB] Read file

> You would benefit from using XML for these data structures. XSLT can be
> used to quickly filter records stored on the clients computer locally. The
> client can then make changes to desired records and upload the XML file
> fragment to the server. The server then has a much lower load as it only
> has to process the changed records.
> I would (and have) get the user to download a ZIP file containing the XML
> file, a web page which processes it and some javascript support files.
> the ZIP is unpacked, the page can then load the XML file from the current
> directory (containing the web page), you would not need to know anything
> about the user's directory structure, and they would not have to browse
> the file when they use your application.
> Another optimisation might be to have the client browser start, and then
> query a URL provided by you. The URL would offer a 'last-updated' date as
> another XML file. Comparing this with a value which you store inside your
> provided XML file would allow the browser to alert the user that a new
> was available, and to visit your website to download a new ZIP file.
> Both IE and Mozilla support loading and scripting of XML / XSL
> In IE you might want to read up on the xmlhttp.load and xmlhttp.send
> function to read remote XML files. (This will require MSXML2.6 or above)
> Hope that helps, I'm not really too sure what you are trying to do, even
> with your description below - maybe a diagram would help us to understand
> your problem ?
> Cheers - Neil
> At 15:00 18/11/2003 +0000, Ng Hwee Hwee
> >From: "Ng Hwee Hwee" <[EMAIL PROTECTED]>
> >To: "Michael Scappa" <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
> >Date: Tue, 18 Nov 2003 10:27:26 +0800
> >MIME-Version: 1.0
> >Content-Type: text/plain;
> >         charset="iso-8859-1"
> >Content-Transfer-Encoding: 7bit
> >Subject: Re: [PHP-DB] Read file
> >
> >what about using cookies?
> >
> >my problem is this: i have about 10,000 hotels records and each of them
> >information about its location, its hotel code, its hotel tel, its
> >code etc... i would like to load this into the clients computer so that
> >they enter a hotel code, all the information will be reflected in the
> >using onChange()... if 50 employees were to query the database always for
> >these 10,000 records, i'm afraid the server can't take the traffic and
> >so i was thinking of uploading a CSV file into my client's computer and
> >have my scripts find the file and read the file for Javascript to
> >since the information in the file changes ususally only once a year, i
> >have to worry that they will have back-dated information..
> >
> >i'm desperate for enlightenment! thanx!! :o)
> >
> >blessings,
> >hwee
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to