/    Sign up×
Community /Pin to ProfileBookmark

PHP Search: Ask a question, get an answer

Hi Folks,

Im trying to create or find a script that allows me to ask a question and get an answer from the database. Im sure this is very complex, but im not sure where to start!

I have a list of FAQ’s: [url]http://studentradio.org.uk/faqs[/url]
You can search these with [url]http://studentradio.org.uk/faqs/?search=QUERY[/url]

The current search uses mysql LIKE. But id like to be able to type in a question as a search, and for it to return relevant data from the list of questions!

Lets take these two questions:
How much is Half Year Membership?
How much is Full Year Membership?

I’d like to be able to ask something like “how much is membership?” or “how much does membership cost” and for it to return the relevant data.

The only way i can see it working is to add a list of possible questions and the results for it to return?

to post a comment
PHP

8 Comments(s)

Copy linkTweet thisAlerts:
@ehimeSep 02.2011 — you should break the words down

full and like could be different factors, either way using a prediction engine is a challenge.
Copy linkTweet thisAlerts:
@dellerSep 13.2011 — Just make the users search for terms with google site search or similar. Artificial intelligence, is still in pretty beginning phases in regards to asking questions and returning useful info. Its possible, but perhaps not worth the effort. Tags for each question/answer might also be a solution for you.
Copy linkTweet thisAlerts:
@glenenacidSep 13.2011 — hello guys! I need your help. I just want to know if its possible to call 2 table in php codes? and how it is? thank you so much. I need it for my thesis!
Copy linkTweet thisAlerts:
@alexandra01Sep 14.2011 — Why is it that the PHP is so sensitive about the codes even a single : or something else it will error already?
Copy linkTweet thisAlerts:
@dellerSep 14.2011 — glenenacid: if you want help, please ask your question in a way that someone can actually understand not just "how to look up 2 tables". Be specific.

alexandra01: All programing languages, and in fact all computers work this way. They read the code "as is" and dont make assumptions that you meant ; instead of :.

Also, please post unrelated comments in a new thread.
Copy linkTweet thisAlerts:
@glenenacidSep 15.2011 — @deller: sorry, i couldn't find the button which i can post a new thread. ;( but since a already started posting here, i'll just continue asking. is it ok. ? ?

we're making a system, it is online store, online shopping like that. the case is, we have the 2 users, the admin and the customer. now since the customer is not yet registered, she/ he need 2 reg. first, and the info. of the customer, will be recorded to the table named, customer. since the admin is the one who can manipulate all the activities, and do all in the system, all he/ she need to do is just to log in, now, my problem is, I set a table for the admin, and one for the customers, so i have 2 table, admin and customer. I the admin log in, it will direct it to admin page and if the customer, it will direct it the customers page. I dont know how to call or to do the codes of the log in, if i will query two tables, if i'll do that, i dont know the codes, if i'll will call only one table, only one user will allow to log in. just like that. hope you can help me. ?
Copy linkTweet thisAlerts:
@dellerSep 15.2011 — First of all, to post a new thread, go to the PHP forum on this website and ther is a button that looks much like the post reply button on this page that says "NEW THREAD" (image here)

ok, several part answer

1: Online stores are often VERY complex systems that require a large team to sort out all of the loopholes and security vulnerabilities. Its best to use systems that have been tested to work and be pretty much secure rather than almost certainly messing up a home grown system. Even advanced programmers make big security mistakes. You are dealing with money here, and mistakes should be minimized professionally.

2: Redirecting is not a good security measure. Someone can just enter the URL to the admin page and have admin access. A better way of doing it is setting a session or a cookie with an ID to a row in a "logins" table.

3:You dont need 2 tables for admins and users. Just add a column for access level and point to a page based on that.

4: If you give me a more general idea of what you're trying to accomplish, i might be able to help more
Copy linkTweet thisAlerts:
@glenenacidSep 16.2011 — our system is just simple, main feature is just to reserve product. but i has an inventory system. where the system will record the stock in and stock out. paying via internet with use of credit cards or any is not involved here.
×

Success!

Help @SRobinson spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.1,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...