Searching without database

Here non-phpBB topics can be discussed.
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Sat01
New member
New member
Posts: 49
Joined: 25 Jul 2008, 23:59
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Searching without database

Postby Sat01 » 17 Apr 2010, 23:26

Hey Rich,

If it's possible, i'd ask your help to make a small searching script in PHP without database.

Pratically, i wonder if it's possible to develop it using just PHP, an HTML form and a page where all products are stored with their features/values (for example using arrays). Perhaps this page could be a XML file..

For example, assume that I want to develop a search form for cars, like this:

search.png


Questions are: how should set the file that stores cars and their features? And how can i connect the form with this archive?

My idea is starting with method $_POST to print results using a simple echo. So, the $_POST function should filter and extract data from arrays (or something like that).

I'm not very good with arrays. I could do this by using billions of if, else end echo, but i think there's a better and more professional solution.

Any your answer would be highly appreciated :)

User avatar
RMcGirr83
Past Contributor
Past Contributor
Posts: 6243
Joined: 30 Nov 2006, 14:23
Real name: Rich McGirr
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Searching without database

Postby RMcGirr83 » 26 Apr 2010, 13:39

Can I ask why you wouldn't use a database?

I would think xml would probably work well.


[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 12 guests