PHP Simplicity Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Guest posting is allowed. Again!

Author Topic: needed mod for your script  (Read 1504 times)

0 Members and 1 Guest are viewing this topic.

Jason King

  • Guest
needed mod for your script
« on: May 27, 2004, 10:29:56 AM »

I have a form that posts to your script as the header.html file in a directory that gets indexed.  So the form is at the top and the directory listing is below that.  When files are uploaded, it works fine, but how do I redirect the page to that directory with the indexing?  I don't want a confirmation of the files uploaded, I want to point it back to the directory where the upload started so it will give the form at the top again and the listing of the directory with the new files in it.

Thanks
Logged

Saleh

  • Administrator
  • Full Member
  • *****
  • Offline Offline
  • Posts: 222
    • View Profile
    • PHP Simplicity
Re: needed mod for your script
« Reply #1 on: May 27, 2004, 11:20:49 AM »

ok I got you..
look for these line at the end of upload.php:

//count the uploaded files and show them to user!
  if (isset($uploaded) and count($uploaded) > 0) {

and add before them:

if (!isset($errors)) {
  header("Location: $_SERVER[HTTP_REFERER]");
  die;
}


this should redirect you back to the page where you attempted to upload the files.
however it will not redirect you if any errors were found!

hmm.. this is interesting..
I think I will add this feature to the next beta so you can disable the confirmations of uploads ;)
« Last Edit: May 27, 2004, 11:24:11 AM by Saleh »
Logged

We don't need a reason to help people
 

+ Quick Reply

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.
Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
Are you a bot/spammer?: