| | |
Searching my web page
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Jul 2006
Posts: 11
Reputation:
Solved Threads: 0
Hi all..
I have built a knowledge base, in html.. would just like to know how I can search for an answer using a search form, that I can have on the home page to find answers on the other html web pages., and just open that web page with the answers on it..
May not be possible. Which is why I came back to the php/mysql section for some PHP script,, if I were to add all my knowledge base answers to a Mysql, database..
So if I added a topics column in database KB, and inserted a whole bunch of random answers, how could I use php to have a simple form,, where I can type a word that may appear in any one of those answers, and all the possible answers can be listed... and when you click on an answer it copies it to clip board so it can be pasted in one swift motion..(I did this in the html version by the way, the click(copy to clipboard thing)..
Any help would be much appreciated, thanks for all your time.
I have built a knowledge base, in html.. would just like to know how I can search for an answer using a search form, that I can have on the home page to find answers on the other html web pages., and just open that web page with the answers on it..
May not be possible. Which is why I came back to the php/mysql section for some PHP script,, if I were to add all my knowledge base answers to a Mysql, database..
So if I added a topics column in database KB, and inserted a whole bunch of random answers, how could I use php to have a simple form,, where I can type a word that may appear in any one of those answers, and all the possible answers can be listed... and when you click on an answer it copies it to clip board so it can be pasted in one swift motion..(I did this in the html version by the way, the click(copy to clipboard thing)..
Any help would be much appreciated, thanks for all your time.
•
•
Join Date: May 2005
Posts: 19
Reputation:
Solved Threads: 0
•
•
•
•
Originally Posted by jeadeb
Hi all..
I have built a knowledge base, in html.. would just like to know how I can search for an answer using a search form, that I can have on the home page to find answers on the other html web pages., and just open that web page with the answers on it..
With PHP and a Database, you are able to search for answers by using a query like this:
SELECT * FROM KB WHERE answer LIKE '%SEARCHSTRING%'
If you want to search for more than one word, just repeat the last part and link with AND or OR:
SELECT * FROM KB WHERE answer LIKE '%SEARCHSTRING%' AND answer LIKE '%SEARCHSTRING_2%'
![]() |
Similar Threads
- Web page in email (JavaScript / DHTML / AJAX)
- Change Web Page Font Size on the Fly (Windows tips 'n' tweaks)
- IE; Getting file download box when attempting to access a particular web page (Web Browsers)
- Interactive excel web page and vb.net (VB.NET)
- unable to access my web page (Domains and DNS)
- Opening a Web Page in a New Window (Windows tips 'n' tweaks)
- Win XP Explorer - Web Page View (Windows NT / 2000 / XP)
- searching the web (Geeks' Lounge)
Other Threads in the PHP Forum
- Previous Thread: listbox--issue php
- Next Thread: Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in
| Thread Tools | Search this Thread |
advanced alerts apache api archive array autosuggest beginner binary broken cakephp checkbox class clients cms code cron curl database date datepart display dynamic echo email emptydisplayvalue eregi error execute explodefunction file files folder form forms function functions google hack head href htaccess html if...loop image include insert ip javasciptvalidation javascript joomla keywords library limit link login mail matching menu mlm multiple mysql number object oop password paypal pdf php phpincludeissue query radio random recursive remote script search searchbox server sessions shot smarty source space speed sql syntax system table tutorial update upload url validator variable vbulletin video web website youtube





