Re: Deleting a page after viewing it
| From: | David T-G | Date: | Thu, 27 Feb 2003 00:00:21 +0000 |
| Subject: | Re: Deleting a page after viewing it | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-137321@lists.php.net to get a copy of this message | ||
Chris, et al --
..and then Chris Hayes said...
%
% At 18:32 26-2-03, you wrote:
% >I have a confirmation of "membership" page a user would arrive at after
% >clicking on a URL in an email. After they click on a link in this page I
% >want to delete the page itself so it will only exist for this one use. The
..
%
% I think this is usually done with a link like 'confirm.php?id=23sahd', and
..
Agreed.
%
% However back to your question. I would not delete a file that is currently
% being executed. That could lead to all sorts of confusion by the server
Although the server should hang on to the filehandle and you could even
unlink at the beginning of your code, I agree that it doesn't sound like
a good idea.
% and/or php. So you could pass the filename on to the second or you could
% read the $_server['http_referer'] to see the filename as url. Then i think
Oooh, yeah. Just let me send your delete script /index.html as my
referrer and we'll have lots of fun :-)
If you're going to unlink, you should do it within the page in question.
Don't trust what comes to you from the outside unless *maybe* it's a
crypted one-time token passed not on the URL.
HTH & HAND
:-D
--
David T-G * There is too much animal courage in
(play) davidtg@justpickone.org * society and not sufficient moral courage.
(work) davidtgwork@justpickone.org -- Mary Baker Eddy, "Science and Health"
http://justpickone.org/davidtg/ Shpx gur
Pbzzhavpngvbaf Qrprapl Npg!