php-general | 2003022
Date: 02/26/03
- Next message: bill: "[PHP] $PHP_SELF with redirected domain"
- Previous message: Leif K-Brooks: "[PHP] Re: [PHP-DB] SESSIONS"
- In reply to: Paul: "[PHP] Deleting a page after viewing it"
- Next in thread: David T-G: "Re: [PHP] Deleting a page after viewing it"
- Reply: David T-G: "Re: [PHP] Deleting a page after viewing it"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
>URL in the page does go to another "Welcome" page which is on another
>server. Do I need to include something in the second page that will do the
>deleting, or can I delete it from within the script for the first page
>that deletes as of the click on the URL. Haven't written any code yet for
>this, but I'm thinking "unlink."
I think this is usually done with a link like 'confirm.php?id=23sahd', and
with that link a database field in the usertable called 'email_confirmed'
that was false by default and then is changed to true. Another field called
'expires_on' with a date in it.
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
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
you need to change that in a proper filepath, by chopping the referer off
from the last slash (eg finding last slash with strpos() and selecting the
end of the string with substr()). See the true file path with
echo __FILE__;
or by running php_info();
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
- Next message: bill: "[PHP] $PHP_SELF with redirected domain"
- Previous message: Leif K-Brooks: "[PHP] Re: [PHP-DB] SESSIONS"
- In reply to: Paul: "[PHP] Deleting a page after viewing it"
- Next in thread: David T-G: "Re: [PHP] Deleting a page after viewing it"
- Reply: David T-G: "Re: [PHP] Deleting a page after viewing it"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

