Pausing a script
| From: | Alex Francis | Date: | Tue, 05 Nov 2002 08:27:59 +0000 |
| Subject: | Pausing a script | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-22983@lists.php.net to get a copy of this message | ||
Instead of exiting the following script after "Use your Browser Back Button
to choose another" I would like to simply pause it until some clicks a link
to allow them to upload the file even if it already on the server. I have
been playing about with "break" but I can't seem to get that to do what I
want.
Ideally I would like 2 buttons, one to go back to the already filled in form
and the other to upload the file.
$upfile = "../files/$userfile_name";
if (file_exists($upfile)) {
echo "The file $userfile_name already exists";
echo "Use your Browser Back Button to choose another";
exit;
}
if ( !copy($userfile, $upfile))
{
echo "Error: Could not save file. <br>.mysql_error())";
exit;
}