Please HELP with comma delimited text file

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
pezhman
Forum Newbie
Posts: 1
Joined: Sat Oct 29, 2005 4:56 pm

Please HELP with comma delimited text file

Post by pezhman »

Hi all

i would like to:

1. make a form in html with a text box call it search

2.make a text file that contain property data. for example:

London,Detached,60000,Y,1
Manchester, semi detached, 10000,Y,3 and so on.

3. Display all property details below a maximum price (the user enters the price in a field on a static web form - the price is read in by the script and used to find the properties as the script reads through the property text file)


Can anyone HELP please??

Thank you
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Post by alex.barylski »

Use MySQL instead...you'll save tons of time...

Asking me for a cirgarette is one thing...

Asking me to smoke it for you...is another :roll:

Your question is waaaaaaaaaaaay to vague buddy...
RobertPaul
Forum Contributor
Posts: 122
Joined: Sun Sep 18, 2005 8:54 pm
Location: OCNY

Post by RobertPaul »

Hockey wrote:Use MySQL instead...you'll save tons of time...
You're right ... but he might not have access to mySQL if he's on a host that doesn't offer it. Which is kinda strange, but they're out there.

Anyway ... pezhman, you'll need to get to know the Filesystem functions rather well. Particularly fgetcsv(). But really ... querying a db is going to be a hell of a lot faster. So like Hockey, I do suggest using SQL if at all possible. It's not all that complicated.
Post Reply