Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is the problem server side?

Status
Not open for further replies.

DEdelson

Programmer
Joined
Jun 1, 2004
Messages
1
Location
US
I am using php to give a survey. There are about 75 pages, each page loads a different question from a mysql database. A string is built and grows as you go from one page to another (sql statement). A few other things are passed but very small. The sql string never gets beyond 2000 characters and I am being generous with that number.
Everything is being passed via $_POST

My problem is that sometimes I will get a "Page cannot be displayed error". Sometimes I get unidentified index errors. There is no delay before I get these errors, so I do not think that it is timing out. Also, these errors only seem to occur as the sql string gets relatively (key word there) large.

Here's the strange part: Sometimes the errors don't occur, sometimes they do - with identical things being passed. If I get an error and hit the browsers back arrow, then click continue I will go through without the error (sometimes this must be done several times). I don't have direct acces to the server but can find out settings and have things changed in it.

Thanks for any help.
 
Everything is being passed via $_POST

This is most likely your problem. If there is the slightest problem with the transfer of data (which can happen easily from 75 pages), this POST data can become useless.

Consider storing your client's answers in a client cookie or server session variable.

- - picklefish - -
Why is everyone in this forum responding to me as picklefish?
 
Questions:
Who or what is giving the error messages?
Are these PHP errors or client side error messages?

I agree with jimoblak, session variables would be the best solution for a 75 page survey. Relying to have all the data kept in a POST variable gives too much responsibility to the client. You know what your server can do, client capabilities are always questionable, so it is IMO best not to rely on them .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top