project help

Home Forums Programming PHP & MySQL project help

This topic contains 19 replies, has 2 voices, and was last updated by  momina 4 years ago.

Viewing 15 posts - 1 through 15 (of 20 total)
  • Author
    Posts
  • #3106

    momina
    Participant

    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

    #3107

    momina
    Participant

    urgent help needed i have to deliver my project soon

    #3108

    Satish
    Keymaster

    Adding 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.

    #3109

    momina
    Participant

    you did not understand the problem problem is i have a seperate search bar and login box i want to include that in my pages

    #3110

    Satish
    Keymaster

    wherever 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.php

    Then 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.

    #3118

    momina
    Participant

    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

    #3119

    momina
    Participant

    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

    #3120

    momina
    Participant

    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

    #3121

    momina
    Participant

    reply soon plz

    #3122

    Satish
    Keymaster

    Are 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:

    Dynamic Page Creation: PHP

    Instead of pages, you replace it with pdf files.

    Hope this article may also help you for handling images(if any):

    Randomly Display Some Images From A Set of Images: PHP

    #3123

    momina
    Participant

    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

    #3124

    momina
    Participant

    i am making my whole project same like this but my focus is on search anyway after visit ans me

    #3131

    momina
    Participant

    waiting for help

    #3133

    momina
    Participant

    satish come back i need urgent help any way to check your online timings?i have just 2 days for my project

    #3134

    Satish
    Keymaster

    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.

    Hope that helps..

Viewing 15 posts - 1 through 15 (of 20 total)

You must be logged in to reply to this topic.