Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Page Navigation From Search Results


I have created a search form that searchs for results from my database matching the criteria to what ever the user inputs. I have done this using 2 php pages the first page points to the second, where the data is sanitised and cleaned accordingly. The results are displayed on the 2nd page. Code:




View Complete Forum Thread with Replies

Related Forum Messages:
Put The Query On The Search Page Or The Search Results Page?
now ive been trying to get this search query for ages now and i cant seem to spot wot is wrong with it have i just over looked something really simple or am i just doing it all wrong?

the query is to select options from a drop down box which is on a search page and then those selections are meant to be shown on this search results page.

the thing is that i dont have the drop down boxes on the search results page, is it ok to link it from the previous page? ive linked it using the form post method at the moment
and shud i put the query on the search page or the search results page? Code:

View Replies !
10 Pages Per Page, On Search Results Page.
how to limit the results to 10 pages per page. And for the result of the result to span over other pages numbers 1.2.3. etc. Does anyone have the code for this? Code:

View Replies !
Search Results Page
Say you have three pages, a search page, a results/master, and a detail page. You choose parameters on your search page and submit the page. The results show in the reults/master page. You click one to go the details page. You hit the browser button to go back and it shows the results/master page but shows "Page has expired" error. How can you prevent this? How can you show the results page whether you get there forwards or backwards?

View Replies !
Search Form And Results Page
I have a table called "lista" into my mysql database.This table has 5 text columns : "TRANSLATEDTITLE" "ORIGINALTITLE" "ACTORS" "DIRECTOR" "YEAR" , and 1 image column called "COVER".

I want to create a page with a form to search entries into this table (ex. with Title, Actors, Director, Year), and anotger php page with the search results shown inside, everyone with a link that opens a pop window (ex. 400X320). Code:

View Replies !
Return Search Results On Same Page
I'm struggling with this much longer than I think I need to,

How do I make the results of a search display on the same page as the
search, sort of beneath the 'submit' button? Thanks for helping out.


View Replies !
Search Results Not Displaying After First Page
I have implemented a simple search facility into one of my pages but unfortunately it only displays the first page of results. The pagination is correct and it creates the correct number of pages but there are no results displayed after page 1. Code:

View Replies !
Search Results Showing An Include Page
I have a page index.php which includes different templates based on a passed URL variable through the include() function. My problem is that I have the files saved as temp.inc.php files. Search engines are returning the include page as a result and then the user is directed to a new window with just the include page displayed. Any ideas on how to get around this?

View Replies !
How To Pass Mysql Search Results From One Page To Another
I am creating a website that uses PHP to query a MySql database. upon supplying the PHP script with a given search string and search term, a list of scientific documents with attributes such as author, date, url and revision are returned. Each document also has a unique id number within the database. What I would like to do is create a system whereby user of the site can leave reviews for each particular document, much like the product review system employed at jungle.com. I have got to the stage where the php script outputs a list of results each separated by a horizontal rule and what i would like is to be able to place a button on each record marked submit review, which would then take the user to a form where he or she could leave a review which would placed into a reviews table in the database.

However my problem is that i do not understand how to pass the paper id automatically to the form such that the user does not have the inconvenience of having to type into the form. Does anyone have any ideas on how I could solve this problem?

View Replies !
Results From Multiple Search Engines In One Page.
I am trying to build a script wherein the user can search multiple search engine like google, yahoo, msn from one page and the results get displayed in one page. Some thing like this link. Code:

View Replies !
Search A Database And Return The Results In The Next Page
I have a page that needs to search a database and return the results in the next page. how would i do that. I really need help. I am an intern and have a big project due.

View Replies !
Display NuSoap Search Results To New Page
I have a google-api nusoap search window that works great, but displays the results over the current page, which is unreadable.

What I am trying to accomplish is to send the results to a new page called search.php.

This page (and the page where you enter the search paramaters) have includes for the headers, scripts and footers, so it is not easy to display the code here. Code:

View Replies !
Display Search Results In Iframe On Different Page
I have 3 pages

search.php --> with search form on it
results.php --> has results of search
display.php --> this has an iframe

when someone clicks submit on search.php

i'd like results.php to display in the iframe inside display.php

is this possible? and if so how?

View Replies !
Search Engine Uses Pagination To Display 10 Results Per Page
I am having trouble with a search engine I am making in PHP. I have a script that uses pagination to display 10 results per page and creates a next link to the next page of results.

The problem is, is that there is no ranking that done it just puts whats in the first row of the table first and whats in the second row of the table second and so on and so forth. I tried using the LIKE operator withe my script that uses pagination but it does not work. Code:

View Replies !
Search Results ($num_rows) Does Not Match $search Results (PHP,MySQL)?
For example, when I do a database search for a term I get 2 results but the $num_rows says there are 3 results.

I suspect it's because there are similar keywords within different search fields of the SQL statement. But I am stumped as to how I can change this. Any Suggestions? the code:

View Replies !
Navigation Of Photos After A Search
I have recently developed a page to display photos after a search of a Mysql database - this works fine. The next stage is to click on any of the results (photo) and this will take you to a new page displaying the photo but in a larger format.

I have tried to use the url parameters but I dont understand how to use them in the new page to link the picked photo in the search page. I use Apache/Mysql/PHP, however a a newbie I use DMX to view the page and source code.

View Replies !
Results On Multiple Pages: Storing Search Results Or Query Again
Suppose I have a search result with different pages. I could store the results and get them out of the database with a simpler query for the next page. Or I could query again and display only a portion of the results (eg from 20-30). What would be the most efficient. How would bulletin boards do this, or google?

View Replies !
Search Results Pagination - Tutorial For A Fulltext Boolean Search Engine
I have been following a tutorial for a fulltext boolean search engine and have managed to adapt it to my needs apart from on e thing that I really can't get to work; pagination of the results. Code:

View Replies !
Search Brings Back Different Results Or Sometimes No Results
The problem Iv got is that when searching the site - it brings back different results or sometimes no results. For example: "i026", "i 026" and "026" do not bring back results for "I-026" which is the correct model number. Any ideas on how to make it search more variations or of a "Did you mean... I-026" script?

View Replies !
How To Do Page Navigation Bar Using Php Codes?
I would like to know how to set up a page navigating system in a web site using php codes.

View Replies !
Keep An Html Page And Use Php For Navigation
How can i keep an html page and use php for navigation so it can be easily updated.

View Replies !
How To Create The Navigation Page
how to create the navigation page in php. The navigation should be from first page,next page,end page,and previous page.Give an example to code for the navigation page.

View Replies !
Home Link From Navigation Page
I got a code which helps me to create navigational links and only show 4 results per page. Now I want to add a link on each page such that if anyone clicks on that link it takes it to HOME page. I have added

<a href="Home.htm"><b><font size="4">Home!!</font></b></a>

inside the loop that generates NEXT and PREVIOUS page link but whenever I click on HOME it does nothing at all.

View Replies !
Navigation Back To An Html Page
I can't seem to figure out how to navigate back to an html page from a php page.

View Replies !
Adding Page Navigation To Record Set
I have gone through the tutorial on php freaks for adding page navigation to records. I am in the middle of integrating the page navigation and have stuck on  2 areas.

1)
I have a page which displays a set of records (limited to 6 per page)
Below,is the Next and Previous navigation text bUt it is not hyperlinked!!!?? 

The line of code specifically is:

<?php
echo("<a href="$PHP_SELF&page=$pageprev">PREV".$limit."[/url] ");  - This should be hyper-linked but is not??

I think there could be a problem with the <href bit being AFTER the <?php. I am basing this on the fact that a previous record i made began the hyper-link <href BEFORE the <?php where as before the <?php was added only after : Code:

View Replies !
Highlighting Of A Search Term In Search Results
I am writing this simple MySQL and PHP search and what I want to do is to highlight the search term in the results when they are displayed on the screen.  I am able to get it to work. but the seach term will only be highlighted(Make it Bold) only if it matches exactly to what was typed in the search box. 

Is there a way where the search term doesn't have to exactly match in order for it to be highlighted?  Below is the code where I change the the search term into bold to be displayed on the screen.

<?php
$result_manufact = str_replace($splitstr, "<span style="color: red; font-weight: bold;">$splitstr</span>", $manufact);
?>

View Replies !
Automating Page Navigation And Control Transfer
Is there a system available to do the following:
consider an app of a few pages:

page1.php:
form1----->page3.php
form2----->page4.php

page2.php:
form3----->page3.php
form4----->page4.php

when I am at page3.php, I do not know whether I came there from
page1->form1 or page2->form3.
I can check for $_SERVER['HTTP_REFERER'] and get an answer. But this
example is simple. Let us generailze that I want an app that keeps a
track of all the pages the user requested, in the order that they were
sent to him.

Obviously, it can be written based on sessions. Is there already some
popular open source application for this?

Also, this brings me to a broader question of page navigation rules. In
an app made of 20-50 pages/scripts, life will be hell if there is no
systematic approach to transferring control between pages. Is there
some kind of structure already made and readily available into which
you just plug-in your pages by telling some rules ?

E.g. the scheme is something like:
$ListOfPages = array(
1=>"Main.php",
2=>"Edit.php",
3->"Add.php",
..........,
N->"Error.php");

$RuleSet = array(
1=>array("Main.php","Edit.php","allow_edit"),
2=>array("Main.php","Add.php","allow_add"),
...................
3=>array("Main.php","Error.php","my_error_handler")
);
The RuleSet is a set of page transfer rules based on evaluation to true
of the specified functions, i.e., allow_edit(), allow_add(),
my_error_handler() etc.
Obviously, form submission is the chief means of control transfer for
PHP programs and the use of ?op=add_something in URL's(GET) and <input
type=hidden name=op value=add_something> (POST) are a step towards
making some kind of structure.

So the grand code will look like:
$MyGrandAppControllerObj = new GrandAppControllerObj();
$MyGrandAppControllerObj->setPages($ListOfPages);
$MyGrandAppControllerObj->setRules($RuleSet);
$MyGrandAppControllerObj->Run();

View Replies !
Page Numbering - Change My Navigation Menu
i am busy with a image gallery and i have it working. but now i want to change my navigation menu this one: [1] [2] [3] [4]  to:

<<first [1] [2] [3] [4] [5] [6] last>> i have also this code, (c second code ) but i cant link it to my foto folder and unsort it from 10 to 1 ,like the newest u c first. Code:

View Replies !
Multiple Navigation Tables On One Page (master - Slave)
I just wanted to refresh only part of the page, i.e., table2 on my php page. here is my javascript code which performs the refresh it works fine and my php file display all the records. the only problem is: I have got two tables on the same page and i only want to refresh the second table when i click the a row of my first table rows. Code:

View Replies !
Is This Possible With Search Results
Is it possible that when someone does a search on your database, that the results are downloaded as a text file?

View Replies !
Is Anyone Else Able To See My Search Results?
Here is the thing. When you go to this page:

http://www.accumulist.com/index.php...llFields%5D=api

I've put in some HR tags in the HTML to separate the 3 different
queries. After those 3 queries you'll see results at the bottom. For
me, those results look like this:

api (4), darren (1), xml (12), battlepanda (1), war+on+drugs (6),
stupid (1), moron (1), nightmare (1), hell (1), mijkuynbvfsds (1),
police (1), Pitchfork+Media (1),

There are two problems here. Do you get this when you go to this page?
I'm concerned that I'm only getting back the things that I have
personally searched for, and not the things that others have searched
for. Let me know, please, if this works for you.

The goal of this script is to be able to say to the person who is
searching "People who searched for this item, also searched for these
other things."

It is suppose to be a little like on Amazon.com, where when you buy one
thing, it says "Customers who bought this item also bought these other
items:".

I'm sorry I didn't give the table structures earlier. The visitor id of
searchHistory is the id of visitors. machineId is a unique value
generated and set by a cookie.

#
# Table structure for table `searchHistory`
#

CREATE TABLE `searchHistory` (
`id` int(11) NOT NULL auto_increment,
`query` text NOT NULL,
`visitorId` int(11) NOT NULL default &#390;',
`domain` varchar(255) NOT NULL default '',
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=88 ;

#
# Table structure for table `visitors`
#

CREATE TABLE `visitors` (
`id` int(11) NOT NULL auto_increment,
`date` int(11) NOT NULL default &#390;',
`ipAddress` varchar(15) NOT NULL default '',
`hostname` varchar(255) NOT NULL default '',
`machineId` varchar(255) NOT NULL default '',
`referrals` varchar(255) NOT NULL default '',
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=8236 ;

View Replies !
Search Results
PHP Code:

<html>
<head>
  <title>Search Results</title>
  <style type="text/css">
<!--
.style1 {
    font-family: "Times New Roman", Times, serif;
    font-style: italic;
    color: #990000;
}
-->
  </style>
</head>
<body>
<h2 class="style1">Search Results</h2>.

View Replies !
Odd Search Results...
I am about to release a simple search feature on my website for people to either search through the database of names or usernames. Here is what the search query looks like in PHP: PHP Code:

$query="SELECT * FROM users WHERE name OR username LIKE '%$name%' LIMIT 0, 100";

Now, everything seems to work just fine except for the fact that every single time i make a search query, whether it be 'a' or 'aoisdf098a7sd0f98a7sdf', it always returns the following result:

username: 4carmaperk
name: 4th grade information

This user is the only user in the database whose username begins with a number...is that why he always appears? How can I fix this?

View Replies !
To Search Within Search Results.
Is there a good and efficient way of searching within previously searched records using PHP/MySql? I tried searching on google with several keywords like nested search, search within results, recursive search with PHP and MySql, haven't got a clue so far yet.

But I thought it might be just storing previously queried sql statements and to a select on it each time the search button is called? Any ideas?

View Replies !
How Do I Underline My Search Results?
This is a PHP/MySQL question.

I have a search engine that finds matches of a word in artist names, and their album titles. How do I underline the word that is matched when I display the results? I've seen this on Yahoo! and was wondering how to do it.

View Replies !
Multiple Search Results
I have a php script which searches a mysql database and returns and lists the results 25 records per page. I am using the offset to do this. It works well. But I am outputing the search results 1 record per line, 25 records per page, with links to the previous and next pages, etc.

What I really want is to list the results in a 5 X 5 table. ie the first 5 records on table row 1, the next 5 on table row 2, etc.

Obviously for the last page there may not be 25 records, but anything from 1 to 25.

How can I automatically output html to produce the table and populate each cell with a record from the search result?

View Replies !
Links From Search Results
i was wondering if anybody can tell me how to make a url link to another part of my site from a completed search result. here is a section of my code i would like to link from.

echo("<b>"." Name: "."</b>".$row["Name"]."<br>");

View Replies !
Printing Search Results
How would I go about printing a list of search results? I have my query down fine:

<?php
$query = "SELECT data1, data2 FROM table WHERE name = '%$var%' ";
$result = mysql_query($query);
?>

I need to know what to do after this so that all results are printed in a table that includes 'data1' and 'data2'. I'd imagine this is done using 'while()' loops but I've never worked with one before and especially not in this context.

View Replies !
Search Results Substring
I have been searching for some clues as to how to show a substring from a
database search.

$pagetitle = "Page Title";
$pagetext = "This is <b>a typical</b> string that would be stored<br>in the
database.";

Search for "that" results would look like

1. Page Title
...string that would...
2. Another page
...computers that can...
3. Further Page
...languages that are...

At the moment the search results just show the page title. The idea is that
in the set of results I can show the user the context of each result, a bit
like a search engine does. Ideall I would like up to 10 words either side
of the search keyword.

View Replies !
Counting Search Results
I would like to know if anyone can show me how to count search results in a MySQL database for a keyword ($keyword).

View Replies !
Search Related Results?
how do I do a search related results? I mean, just briefly which function I need.

View Replies !
Posting Search Results
i am a bit stuck on this part of coding, when people search ALL categories i leave the option value as: <option value="0"> so if 0 is passed to the GET all categories should be searched instead of just category 1,2 or 3 etc Code:

View Replies !
Search Results Pagination
I have problem with results pagination. When search is applied browser is showing me first 10 results, and links to other pages, but there is a problem with these links (passing variables i think). When i press on one of the links browser is showing me info that search input must be longer then 2 char. (so it clear that search input has not been passed thru the link. Code:

View Replies !
Limiting Search Results
I have written a search script for my database but now I want to limit the results to ten a page and then make it possible to see the next (or previous) page. All my attempts so far have failed. Code:

View Replies !
Going Back To Search Results
I'm trying to work out how to go back to the search results page from an individual product page. I've tried to use the following code:

if (isset($HTTP_REFERER)) {
echo "<a href='$HTTP_REFERER' class='text'>Back to search results</a>";
} else {
echo "<a href='javascript:history.back()' class='text'>Back to search results</a>";
}
but the problem is that it just sends the user back to the last page, so isn't reliable enough.

I have a product page which contains one or more images, each image requires the page to re-load, so I want to re-direct the user to the search page from any of these iterations.

Could someone suggest how to do this? Is there a way of writing search variables into a session identifier that I can easily reference?

I know of several ways to do it using if statements and writing lots more sessions but I'm sure there's a cleaner way...

View Replies !
Search Results And Pagination
i'm having a wee bit of trouble with my search results and pagination i'm using the same pagination script i usually do with most pages, but this is proving to be a bit more difficult Code:

View Replies !
Database Search Results
i have a paid to read website,im hosting it off my own pc..as a member you can search offers and complete them, heres where i need some help..when a member clicks submit and the offer goes to an offerdone table i need the offer to hide from them so they cant do it again,also that same offer needs to hide in the search results as well...is there somthing like onclick hide and for the results something like if duplicate hide from search or if offer found in this table hide from results...

there are 2 tables one will all my offers the other with offer they have done,also this needs to apply for each member account.i am new to all this and have made it this far to have my site up and going but im looking for those extra catchs i could really use,so that a member cant repeat an offer they have already done,

View Replies !
Splitting Search Results
I have a search page and try to split the result, as it is nicer to see, insted of 100 result to get it by 25 each.

The code is doing everything it have to do, but every time i go to the next page, it starts indexing them again from 1 insted of 26,27,etcetera...

I am a little tired of looking and at this moment i don't see the problem. Any suggestions. Code:

View Replies !
One To Many Database Search Results
I am using PHP to search a MySQL database I can search multiple tables successfully but I want to display one result from one table, with multiple results from another table:

In my database one practice example has more than one category. My current PHP displays all the fields for the practice example with every relevant category. I want to display the practice example details once, then list all the categories for that practice example. Code:

View Replies !
Search Results Not Working
For some reason when a user logs in and posts an item for sale, the item does not show up when you click on the categories to the right.

I am new to php and do not know anything really. I ran my install.php file thinking that it would fix it, but it did not. I figure, the search.php file is trying to locate the stored data in a database, but finds nothing, and so it posts nothing. That is why NO RESULTS FOUND comes up.

View Replies !
Similar Search Results
I have a column with names:

1. John Doe
2. Mary Parker
3. Thomas Smith

And I want to get row number three as a result. I have tried soundex('string') but as I see it I can only make it work on the whole field, and as "Tomas" does note sound like the complete "Thomas Smith" I don't get any results.

One solution could be to have firstname and lastname in seperate columns, but I would want the feature to work so that when I search for "Anne" I get the result "Mary-Ann" as well. So just seperating firstname and lastname won't help me 100%.

View Replies !
Pagination For Search Results
Any ideas on how I can add pagination to this search script? Code:

View Replies !
Paging Of Search Results
need to do some paging for my search results after a form submition. I had a code with me now. But it does not carry the $keyword = $_POST['keyword'] forward to the next page.
Therefore everytime when I am suppose to reach the end of the result.

It generate all the page too with the remaining items in the database. I know I did not pass the $keyword to the NEXT page. But I had no idea how. My paging only works if I hard code the SELECT item FROM table WHERE column LIKE '%KEYWORD%' Instead of $keyword.

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved