473,386 Members | 1,860 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,386 software developers and data experts.

writing current page to database/file

I'm writing a page that is dynamically created. I'm using PHP sessions, and have run into the issue of sessions timing out when someone walks away from their computer - but they have completed a large amount of work on one page. I initially thought to use AJAX to pass the current pages information to a PHP page that would just input the information into the database. The issue was, passing the page information using the GET method didn't work with larger amounts of information.

So, what I want to see if I can do, is use AJAX to generate the information to an XML file.

Thanks!

--My apolgogies. I was doing some more research, and found out that AJAX Supports the POST method, which should get me what I need--

(btw, tried searching the bytes.com for this question, but the search bar wasn't working, so, my apologies if this is answered somewhere else)
Feb 3 '09 #1
5 1453
acoder
16,027 Expert Mod 8TB
Yes. Are you making the Ajax request onunload?
Feb 3 '09 #2
No. It actually saves their work every 15 minutes, and whenever the save button is pressed. I guess the way I'm thinking is that I don't want anything saved if they are finished with their work (there is a button to click to generate the next page of information). So, once that button is pressed, it will wipe the saved information on the database, and stop the save function, to ensure that no work is duplicated.

I switched to using POST method to pass the AJAX, but still found a limitation with POST (about 85000 characters with some testing). My solution is to actually take the information, and split it up into multiple AJAX calls with javascript regular expressions, with the PHP page concatinating the results into the correct field on the table. Still haven't tested it, and I may end up using multiple rows for a page if I have to, but that would complicate things a bit, since each user has a row in the table.
Feb 4 '09 #3
acoder
16,027 Expert Mod 8TB
If size is a problem, perhaps you should consider splitting up the page into a number of smaller pages. However, I don't think POST has a size limit. That would depend on your settings, but it should be able to cope with more than 85Kb.
Feb 4 '09 #4
bugboy
160 100+
Maybe this would help?

serialize-javascript-objects-to-xml
Mar 7 '09 #5
My biggest issue with size was a series of drop down boxes, that could contain very large lists. I found the solution to be to not inlcude the drop down boxes in the save. I haven't had any issues since then.
Mar 8 '09 #6

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

Similar topics

4
by: George Stout | last post by:
First off I do not know alot about writing queries to an Access Database from an ASP page. This is why I need help. I have an Events database for 6 colleges in our metro area. On the homepage I...
6
by: Jeff Thies | last post by:
I've been thinking about writing CSS that's easy to read and adjust at a later date (often by someone else). Here's where I seem to be headed: Breaking the page down into container divs,...
4
by: HNguyen | last post by:
Hi, I have a Web application in ASP.NET. My Application allows the users upload files into the server after checking their user names and passwords. For each transaction, the Web program will...
12
by: Chris Springer | last post by:
I'd like to get some feedback on the issue of storing data out to disk and where to store it. I've never been in a production environment in programming so you'll have to bear with me... My...
1
by: darrel | last post by:
After months of trying to track down a bug where, randomly, on rare occasions, our XML files only get half-written from our application, we're throwing up our hands and moving it into the DB. ...
2
by: Roger Withnell | last post by:
The current page has: Response.Write "<a href=""FileDownload.asp?FileNo=" & UbeRS("FileNo") & """>Down</a>" FileDownload.asp has: .. 'Update downloaded file status in ubMgtFiles UbeQ =...
6
by: bonk | last post by:
I am trying to create a stream that writes text to a file and: - automatically creates a new file once the current file exceeds a certain size - makes it possible to be used by multiple threads...
4
by: Jeff | last post by:
I've been working on porting some perl CMS code to PHP. What I would do in perl is search through a template for instruction and replace those instructions with specific bits for that particular...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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,...

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.