i am making a content management system using php and my sql in my project menus and pages are coming from database my problem is i want to add a search bar loginbox in my pages and also some links i dont now how to add these in my pages kindly help

For search bar:
Create a form using form tag, use a text input field and a submit button.
Once the user submits, take the string entered by the user and compare it with the data present in your database. Using MySQL %like% variable search for the similar words, fetch them and display it on a page.

another problem is i want to show some pdf files in my website how i can?i mean pages are directly coming there is no way to add links etc e.g i have just 1 page name pages.php and in that just select * from pages table thats al for example i want to add some links in my home page how i can?and i just want to show search bar in search menu or search page you did not understand my problem try to be pages are just in data base and just calling from that thres no way to add some thing in pages separatly

i add login box according to your method but login box is showing at bottom i want to show that in right side below my search bar and after some text mean there is a search bar then my cms introduction and after that i want to show my loginbox on right side

search bar and loginbox are the thing that can be included in every page as acording to your method i add login box in pages.php and its showing on all pages of the cms but something like pdf links are diff for every page so how i can add diff links in evry page separatly this the problem i hope you got it now waitng for your reply

yes cutom bulit cms with php and my sql i have a search bar search resutls are coming from database i want to add pdf file links below every result actually i am making a cms on health cure so i need to add some pdf files for example when a user search for health then article name come from data base i want that a pdf link should be there for user below the article name so that user can read it…. kindly visit http://www.jpmi.org.pk/index.php/jpmi this and search for something then you will come to know what i am taking about so that you can easily help i am making same like this

In the website you’ve liked: They’ve attached the pdf file in the individual pages and not in search result page. If you ought to build a site exactly like that; include the pdf file inside the article body with it’s nice little image.

If you’ve a table called university, with column names collage and class`
SELECT * FROM university
WHERE ( collage LIKE ‘%New%’ OR class LIKE ‘%new%’ )
and ( collage LIKE ‘%York%’ OR class LIKE ‘%York%’ )
`

take the search term New convert it to lower cases or all other combination.
If the user enters two word string like ‘New York‘, then split it and try matching it separately with your table contents.