Tim, This is a dangerous way of doing things, if you get a couple of people registering at the same time the system has the possibility of getting the wrong entry, you best bet is to have the upload script return the last insertid(I'm assuming your database has an autoincrement/id field) and pass it onto the next screen via a hidden variable in the form or via the url.
Mark -----Original Message----- From: Tim Thorburn [mailto:immortal@;nwconx.net] Sent: 15 November 2002 10:11 To: [EMAIL PROTECTED] Subject: [PHP] Finding last entry in MySQL database Hi, I'm creating a form which will allow individuals to add themselves to an online database and ask if they'd like to upload a picture. I have the form setup which allows the individuals to add themselves - currently it asks if they have a picture to upload (a yes or no drop menu). On the screen after the individual adds them self, I'd like to check the database for the last entry (the one just made) and then see if the picture column has a yes or a no stored. What I don't know is how to select the last entry in a database ... I'm sure its something very simple, but with being up until 5am working on this site - it's slipped by caffeine powered brain. Thanks -Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php