CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
search results

 



keith2045
Deleted

Jan 19, 2001, 5:38 AM

Post #1 of 5 (587 views)
search results Can't Post

I am having a problem. I kinda of made a search engion, it's not really a search engion but i have a script in it where it seperates the results into different pages. But that is not working. Can someone tell me why. You can see the script in action at http://www.mycashworld.com/cgi-bin/surf.cgi or see the source at http://www.mycashworld.com/test.txt
Also when i click on the next button it takes me to the next page but with the same results

Thanks

Keith



Jasmine
Administrator / Moderator

Jan 19, 2001, 11:01 AM

Post #2 of 5 (581 views)
Re: search results [In reply to] Can't Post

Sounds like the program doesn't know (or isn't acting on) a "start from" variable.

You may want to check out the Multiple Search Results Pages in Perl article.



keith2045
Deleted

Jan 19, 2001, 12:56 PM

Post #3 of 5 (576 views)
Re: search results [In reply to] Can't Post

I already read that article. That's where i learned how to do this. Also how do i get the program to count how many results were found and store them?

Thanks

keith



Jasmine
Administrator / Moderator

Jan 19, 2001, 4:15 PM

Post #4 of 5 (570 views)
Re: search results [In reply to] Can't Post

I don't see where the total number of posts per page are, and where the search terms are being received from?

If the results are stored in an array, the count is:

Code
   $total = @results

If the results are stored in a hash, the count is

Code
   $total = scalar keys %results;



keith2045
Deleted

Jan 19, 2001, 6:39 PM

Post #5 of 5 (568 views)
Re: search results [In reply to] Can't Post

"I don't see where the total number of posts per page are"

It is around the bottom of the page. It is stored in $pagesize

"where the search terms are being received from?"

this script isnt a searh engion. I needed a script that searched a file for a term and print out the lines. It allows me to update the information without having to go to every page to update it.
I also updated the txt file so you can go see the newer version.
1 more thing i dont think that "$total = @results" can you go to the source and make sure i did it right???

Thanks for your help

Keith




(This post was edited by keith2045 on Jan 19, 2001, 5:49 PM)

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives