Computing.Net > Forums > Programming > PHP search file

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

PHP search file

Reply to Message Icon

Name: Phantom Sonic
Date: November 15, 2008 at 15:03:19 Pacific
OS: Windows Vista BASIC
CPU/Ram: 2.0 GB
Comment:

Hi I have got most of my code done with this one project and I keep fixing my errors or problems without posting/asking for help but this one I have no ideal on how to approach it.

I really can't explain this so ill give an example instead.

I have 3 folders and inside each one has 3 files called username.dfs, password.dfs, and auth.dfs.

I can display all of those files witout any problems.

The problem is I can't get it to display what I want it to.

The full path of those folders are dfs/users/id/files.dfs

Here are the folders path

Folder1 dfs/users/1/
Folder2 dfs/users/2/
Folder3 dfs/users/3/

Now say that folder contains a file called username.dfs and inside that file contains "Mike".

And in the second one has "Alex" inside username.dfs

and in the third has "Jake" inside username.dfs


Now I have a submit form where the users must enter in a username and password.

But the problem is with the path where the id is is counted as numbers.

What I want it to do is to only display the data out of the folder that the user's username is.

For example if someone entered in mike I only want it to display the data from dfs/users/1/

and if someone users Alex it would only display data from Folder1 dfs/users/2/

and etc.


How do I make this possible?


If you need the code let me know but the code that I have can look/be confusing.

Thanks

PhantomSonic-We are all born with a destiny.Some of us know it and some of us are still searching for it.



Sponsored Link
Ads by Google

Response Number 1
Name: Phantom Sonic
Date: November 16, 2008 at 09:44:30 Pacific
Reply:

Well now I'm getting close because now I have it where it will only select what the user suggests but now I need to get the number ID and I think I can get that with regex because I'm also learning that too :P.

I'm getting so close but like they say also so far away.

PhantomSonic-We are all born with a destiny.Some of us know it and some of us are still searching for it.


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: PHP search file

Batch File To search file extension www.computing.net/answers/programming/batch-file-to-search-file-extension/18286.html

PHP search function www.computing.net/answers/programming/php-search-function/13314.html

PHP simple file WTF www.computing.net/answers/programming/php-simple-file-wtf/11986.html