Please excuse my ignorance but my question is:
What is the 'best' method of passing data from one joomla article to another article
a) Via 'hidden' elements in a form, hence Post and Request
b) by inserting into database and recovery when required or
c) by inserting data into the session.
and
1) best from reliability 2)best from speed 3)or are they all the same.
Expert opinion sought!! please.
--
Dave
What is the 'best' method of passing data from one joomla article to another article
a) Via 'hidden' elements in a form, hence Post and Request
b) by inserting into database and recovery when required or
c) by inserting data into the session.
and
1) best from reliability 2)best from speed 3)or are they all the same.
Expert opinion sought!! please.
--
Dave
Hi Dave,
The answer, as ever, is 'it depends'.
If you are going straight from one for to another and the data isn’t sensitive then hidden elements are easiest with very little overhead.
If there may be a timing gap between the first and second step - but they are still in a single user session then use the User session. It's a temporary database storage.
If the data is needed to be preserved between sessions then write to a DB table.
Bob
The answer, as ever, is 'it depends'.
If you are going straight from one for to another and the data isn’t sensitive then hidden elements are easiest with very little overhead.
If there may be a timing gap between the first and second step - but they are still in a single user session then use the User session. It's a temporary database storage.
If the data is needed to be preserved between sessions then write to a DB table.
Bob
Thanks Bob,
That was more or less what I expected. I just am not quite sure how reliable session data is if the customer's session is timed out. To use hidden data means going back over working bits of program and altering them. A fatal step sometimes !
Thanks again.
--
Dave
That was more or less what I expected. I just am not quite sure how reliable session data is if the customer's session is timed out. To use hidden data means going back over working bits of program and altering them. A fatal step sometimes !
Thanks again.
--
Dave
Hi Dave,
Session data is not reliable if the session times out! The Joomla! default session time is 15 minutes - and the clock restarts each time they interact with the site (reload a page or click a link). You can extend this if 15 minutes is likely to be too short.
If you want to preserve some data between sessions then you can use cookies. I think that the Joomla! JRequest methods will read and write cookie data. When I have used cookies I have saved the key data in the database and put a unique random string in the cookie to let it be re-accessed.
Bob
Session data is not reliable if the session times out! The Joomla! default session time is 15 minutes - and the clock restarts each time they interact with the site (reload a page or click a link). You can extend this if 15 minutes is likely to be too short.
If you want to preserve some data between sessions then you can use cookies. I think that the Joomla! JRequest methods will read and write cookie data. When I have used cookies I have saved the key data in the database and put a unique random string in the cookie to let it be re-accessed.
Bob
This topic is locked and no more replies can be posted.