validate querystring

From: Date: Thu, 12 Dec 2002 06:36:16 +0000
Subject: validate querystring
Groups: php.general 
Request: Send a blank email to php-general+get-127958@lists.php.net to get a copy of this message
Hello, I have a query string like this http://server/download.php?fname=name_of_remote_file. The script runs and displays a file download dialog box. Is there a way of validating the querystring to ensure that a user doesn't try something like fname=. or fname=.. or fname=? or fname=/, which enable the user to see the contents of the remote directory, without resorting to a load of 'if' statements.Are there any other special characters i should be aware of? Cheers,Dara -- For the largest free email in Ireland (25MB) & File Storage space (20MB), visit http://www.campus.ie Powered by Outblaze

« previous php.general (#127958) next »