Home › Forums › Programming › PHP & MySQL › project help
Tagged: content management sys, menu items, search bar
- This topic has 19 replies, 2 voices, and was last updated 11 years, 4 months ago by momina.
- AuthorPosts
- June 13, 2013 at 11:27 am#3106mominaParticipant
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
June 13, 2013 at 11:31 am#3107mominaParticipanturgent help needed i have to deliver my project soon
June 13, 2013 at 11:37 am#3108SatishKeymasterAdding menu items is easy, just add the anchor links inside the list item tags.
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.June 13, 2013 at 11:53 am#3109mominaParticipantyou did not understand the problem problem is i have a seperate search bar and login box i want to include that in my pages
June 13, 2013 at 12:04 pm#3110SatishKeymasterwherever you want to include those pages use include_once() method.
If your search page is search.php and login form is login.php and your main page is index.phpThen inside index.php
<div id="header"><?php include_once('search.php'); ?></div> <div id="login"><?php include_once('login.php'); ?></div>
use css to position these elements later on.
June 13, 2013 at 4:39 pm#3118mominaParticipantanother 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
June 13, 2013 at 4:48 pm#3119mominaParticipanti 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
June 13, 2013 at 4:53 pm#3120mominaParticipantsearch 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
June 14, 2013 at 7:21 am#3121mominaParticipantreply soon plz
June 14, 2013 at 7:54 am#3122SatishKeymasterAre you talking about search result page ? or just the search form?
What you’re telling is so confusing.Which CMS are you using ? Custom built ?
For adding different pdf file for different pages:
Instead of pages, you replace it with pdf files.
Hope this article may also help you for handling images(if any):
June 14, 2013 at 10:20 am#3123mominaParticipantyes 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
June 14, 2013 at 10:25 am#3124mominaParticipanti am making my whole project same like this but my focus is on search anyway after visit ans me
June 14, 2013 at 2:58 pm#3131mominaParticipantwaiting for help
June 15, 2013 at 4:02 am#3133mominaParticipantsatish come back i need urgent help any way to check your online timings?i have just 2 days for my project
June 15, 2013 at 5:59 am#3134SatishKeymasterIn 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.Hope that helps..
- AuthorPosts
- You must be logged in to reply to this topic.