|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
mikeken Smarty Regular
Joined: 13 Aug 2003 Posts: 57 Location: MN
|
Posted: Fri Aug 22, 2003 7:42 pm Post subject: Dynamic websites |
|
|
Hi, on my websites ppl can update there forms via a form. Lets put me as one of my viewers. I view my profile. It displays all the info about me that the database holds. I then click a link that takes me to a different page(dif template and php page.) In that form I update it and the form calls itself up. After I submit it it reloads the page and the same values are still there. Its a enctype/data form so I cannot refresh, I will just get a blank page but if I leave that page and come back everything is normal.
Also other pages where I get the information from the database I have to refresh those page before the info will update. Except, Im my form above, If I forward it to one of these pages usind header() It will have the right values in it. Please help. The most recent thread about cacheing didnt help I tried lots of thing like this:
[php:1:c295b398f6]
$smarty->force_recompile = TRUE;
$smarty->cache = 0;
$smarty->clear_all_cache(0);
$smarty->clear_compiled_tpl();
[/php:1:c295b398f6]
Whats going on?
If this is the way smarty works then I cant use it(which would be a shame) because my website is going to be a very very dynamic website.
--Mike |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Fri Aug 22, 2003 8:37 pm Post subject: |
|
|
- it's $smarty->force_compile
- it's $smarty->caching
do you have caching turned on on your forms-based pages?
did you read: http://smarty.php.net/manual/en/caching.multiple.caches.php ?
if you have caching turned on and don't use cache-ids your pages' output may never change before the cached templates expire.
check if your pages work with $smarty->caching=false.
if you didn't employ caching in the first place, i don't know what's going wrong with your setup, sorry. |
|
Back to top |
|
mikeken Smarty Regular
Joined: 13 Aug 2003 Posts: 57 Location: MN
|
Posted: Fri Aug 22, 2003 10:55 pm Post subject: |
|
|
the weird thing is that
[php:1:6a272046be]var $caching = 0;[/php:1:6a272046be]
Should I continue on with everything else you said, try it out?
--Mike |
|
Back to top |
|
mikeken Smarty Regular
Joined: 13 Aug 2003 Posts: 57 Location: MN
|
Posted: Sat Aug 23, 2003 4:17 am Post subject: |
|
|
OK, I discovered something. After updating my page, and remember I have it set to not forward anywhere after it updates the database and all that other good stuff, I can click a link that goes to a page that will retrieves that data, and it will work, but if I type it in the address bar I have to refresh for the data to update. Do you know why this is, does this have something not to do with Smarty?
Thanks.
Also, I was actually thinking of switching to a different template engine because of this. So I went looking, I only found junk, I never realized smarty was "that" much better then the rest, All the other ones were especially more confusing to install. Anyways... |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Sat Aug 23, 2003 5:24 am Post subject: |
|
|
@teknoeacid: I'm not sure I followed your problem exactly, but it could be that your browser is caching results.
Make sure you know where all the (likely) caches are in your delivery chain:
application specific (if any); smarty; php accelerator (if any); web server cache (if any); proxy cache(s) (if any); browser
Tell your browser (particularly IE) to ALWAYS check the source page for updates. This doesn't disable caching, it just forces the browser to see if its cache is valid or not. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|