Jump to content

ttommy

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

ttommy's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi, I'm constructing a member system. I want to know if is there any way to track the user. In case the user login to the system, I can know if he/she connected. Once he/she log out or turn the browser off, the system can inform me. I tried to create a the login field in the database. This solves the login logout thing, and work quite ok. But not many users obey the flow (i.e. logout before turn off the browser). Therefore, many users just turn off his/her browser. With this I cannot track if they are really online. Is there any better way to track the user? Thnks for ur help Tommy
  2. Thankyou very much I'm very clear about this by now. However, I have read some article said that if use an object to a session, I have to pass it through a function call serialize() and when get the object from session I have to unserialize() the session variable. What is the diff between your method and the one mentioned above? Thank for you reply
  3. Hi, I create a site with php oop. I want to user to login and store the curently loged in user information into an oject call user. How do I pass this object to the other pages? Or I just have to pass the primary key to other page and use new object to retrieve its information? Will it be too much query for each page? Can I reduce the amount of query to database in some other way? Thanks for ur reply
  4. Hi guys, I'm considered as a new comer with PHP. [b]So please read on, I know it's a little bit wordy for my problem but I have no expertise in this area at all you are my only hope[/b]. Therefore, I'm here seeking for help. For my first project. I was instructed to create an Online-Examination site. The site should allows a group of people  (employees in the company. About 500 users on average per test, we have total of 1300 employees) to take the test online at the [b]same time[/b], report the result after test finnished, report the summary report to  the manager of training center.Since there are very bad environment in some place therefore network disconnecting or out of electricity is expected every moment. The Site should support user to re-login and continue the test once he/she got disconnected from the network or her office goes out of electricity. The requirement also include creating a back-end (admin section) to manage users, tests, questions, reports.   [b]Now the problem comes: [/b] The rest of the modules was ok but there is 1 module which created a lot of problem.That is the module to display the test questions, storing the result, and calculate the time-Left for a candidate. [b]System description:[/b] When user login to the system, the server will verify which test was assigned to the user (1 user can't do more then 1 test at a time). The server will then generate a list of random questions taken from the Question table which belong to the test verified above. Those questions are save into a temp table together with the column time-left (time-left is an integer which indicates the second left for the user to continue test). After done those job, user will be directed to a page where the first questions will be display, this page also contain a Java Script timer. The JS timer take the parameter is the data on time-left column on table temp, JS timer will count down from this number and display to the screen as the time format (e.g. You have  [i]hh:mm:ss[/i] left to finnish this test). If the parameter is 0 or less than 0, the JS timer will activate a function to submit the form and print a message to inform user that no more time left. [u]THere are 2 submit buttons on the this page[/u] [i]when finnished one question, user will click on  the button (named: Next)[/i]. This will submit the form to itself (e.g. the page is taketest.php so the action of the form will be <action = "taketest.php">). The page receive the result then update the temp table with first question is done, time interval of first question. The server will get the last time-left minus the time-interval then store the new time-left back to temp table. [i]when finnished the entire test, user will click on the button (named: Finnish).[/i] This will submit the form to the same page as above, it will display the result report, update temp table, result table in the database. The above are how the test work. Next question is just a recursive work until the last question. The site works fine with 1-4 users concurrently taking test. However, [b]when I raise the number of users taking test to more the 5 users[/b] then I got [b]2 errors:[/b] 1. Fatal Error: Timeout. 2. The timer return a negative value right from the beginning of the test (e.g. Time to do test is 60 Mins, after 2 mins JS timer return value x and is sent to server, after the calculation it stored the nagative value x1 to time-left column on table temp) I used PHP 4.3, MS SQL server Enterprise Edition 2000, server IBM Xseries 206 1 CPU 3.4 GHz 2GB RAM, Windows server 2003, Apache 1.3 and IIS 5.1 was tested with the site. Users have various connection speed however the lowest bandwidth is 1Mbps (leased line).  [b]The question is:[/b] 1. Is this problem caused from the databse, the Web server or any other cause like network traffic? 2. What should I do to test and find out the problem if the question 1 was not answer? 3. Is there any other solution for this problem to eliminate the problem? Thanks for you time to read this Plsss...... help me. I'm totally lost in this problem Tommy
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.