How do i load page everytime with new data?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
urnetmate
Forum Commoner
Posts: 27
Joined: Wed Sep 27, 2006 1:09 am

How do i load page everytime with new data?

Post by urnetmate »

hello frnds,

I have used a CMS system and done some changes as per the requirements. The CMS uses the Javascript and PHP for coding and MySql as backend.

The modules like PDF Manager and Image Manager has the interface to upload .pdf files and .jpg/.gif files resp.

These pages are in php, but the overall editor tools are called from a .js file.

When I upload any file it get's reflected in the list on the same page, but if i close that and again clicks on the same tool then that newly uploaded doen't get place on that list of existing files.(the file gets uploaded on the specified folder.)

When i logout and logs in the system the i can see the file in list. So i think it's a problem with cache...

What can i do? Plz suggest me some solution..
waiting....
Rovas
Forum Contributor
Posts: 272
Joined: Mon Aug 21, 2006 7:09 am
Location: Romania

Post by Rovas »

Have refreshed your page after a sucessfull upload?
Put these in your php file it stops the browser from caching data on that page.

Code: Select all

header( "Cache-Control: no-cache, must-revalidate" );
	    header( "Pragma: no-cache" );
urnetmate
Forum Commoner
Posts: 27
Joined: Wed Sep 27, 2006 1:09 am

thx...partially done

Post by urnetmate »

thx for the reply...now my problem is partially solved..

The page is been called from a owner php page on which a HTML editor is placed. One of the tools from the editor is 'PDF Manager', which opens the upload functionality in a new pop-up window.

now with setting header() i'm getting the newly uploaded file in the list, but if i reopens the owner form of html editor. that means now i have to reload the js file used for the html editor.

how do i reload the js file in the same page so that i need not to reopen the owner form page?
Post Reply