/    Sign up×
Community /Pin to ProfileBookmark

Reload page with updated text from a text file

Hello
I have a php script which allows you to upload a file,
At the top of the page is a list box with the latest 20 uploads.
I have the code to where it will upload, write the values to the text file etc.. but when the page is reloaded after uploading the file. The listbox doesn’t reload the latest 20 text file.
Does someone know how to accomplish this?
By typing the website and pressing enter works, but refresh resends the data again.. ?
The site is (in dutch) and located at [url]http://www.myantwoorden.tk[/url] as working example.

[upl-file uuid=f5a9fc41-8e3a-4451-8fa1-8992f3fd9660 size=2kB]upload_refresh.zip[/upl-file]

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@crh3675Jan 31.2004 — Add some caching info to your PHP file:

<?

header("Pragma: no-cache");

?>

Actually, you are performing the upload after you have listed the files. Move the location of the upload script to before the location where you iterate the files.
×

Success!

Help @DJsAC spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.5,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...