|
Posted by kkadrese on 02/22/07 16:06
yes, thank you, it works - putting all into single file.
> | hello group,
> |
> | in upload form on action a php script is called. How to return from
> | this script to the calling page?
>
> either leave the 'action' out all together, or make it point to
> $_SERVER('PHP_SELF')
>
> | Or maybe it could be done in such a way that all the code resides in
> | one file, action script is a php function somehow initiated?
>
> put a hidden input in the form named something like 'inputSubmitted' (or
> just name the submit button in the same way) and check at the beginning of
> the page script - take the desired actions you want.
>
> if ($_REQUEST['inputSubmitted'])
> {
> // check to see if anything was actually submitted
> // check to see if upload was 'safe' (free of viruses and strip [or
> comment out] anything that php may mistakenly execute)
> // check to see that file attributes meet business/internal rules (file
> size, nomanclature, etc.)
> // show messages/warnings/errors related to the transaction
> // relocate uploaded 'safe' file(s) (either to different path or store in
> db)
> }
>
> // this is where your current page code beings
>
> hth
[Back to original message]
|