MyBB Community Forums

Full Version: Future question on PHP and site searching.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I currently am re-learning HTML, and CSS, however I like to jump ahead of things sometimes (can be risky).

Say I made a form, with a "Tags" input area (for like posting tags) and saved the "Tags" in a variables file.

Then if I were to make it so that the variables where arrays, with the URL of the post saved in em, would it be possible to show the results of that file on a search results page?

And wouldn't that limit my "site search" to tagged words only?
Who exactly are you going to save the posts itself?
(2011-01-07, 10:58 PM)Aries-Belgium Wrote: [ -> ]Who exactly are you going to save the posts itself?
Who would they be made by? The admin of the software.
(2011-01-07, 11:11 PM)Claire Wrote: [ -> ]
(2011-01-07, 10:58 PM)Aries-Belgium Wrote: [ -> ]Who exactly are you going to save the posts itself?
Who would they be made by? The admin of the software.

I'm sorry: I meant to type "How" Big Grin It's late already Toungue
(2011-01-07, 11:14 PM)Aries-Belgium Wrote: [ -> ]
(2011-01-07, 11:11 PM)Claire Wrote: [ -> ]
(2011-01-07, 10:58 PM)Aries-Belgium Wrote: [ -> ]Who exactly are you going to save the posts itself?
Who would they be made by? The admin of the software.

I'm sorry: I meant to type "How" Big Grin It's late already Toungue

Not too sure on that. I could use cookies, but I was gonna use the PHP create() function for creating HTML pages so that the user wouldn't have to use .httaccess.
If you use cookies or the session it would only be available to the user who posted it.

You either have to use files or a database engine to save an retrieve information that every visitor can see. The best option is to use a database (like MySQL or SQLite). If you don't have the option to run a MySQL server on your host for some reason, I would recommend using SQLite. SQLite actually uses a local file to store its data in. Normally PHP supports this by default.

If a database isn't an option, you can use plain textfiles but then you are really limited in the things you can do. You can store information about a post into an array and save the serialized information to a local file.