Welcome! Log In Create A New Profile

Advanced

include on search.php page

Posted by Kated 
include on search.php page
June 15, 2017 08:24AM
Hi

I got the sphider installed on my site but now I need to set up the search,php, I guess its a <php include tag> but I don't know what files to include. Please can you tell me how to set up the search.php page so that it shows up as non is supplied with the package. I have to set it up manually.

thanks
Kated
rap
Re: include on search.php page
June 16, 2017 11:22PM
Search.php IS included in the package. You can either link to it directly from your web pages, or initiate a search directly from one of your pages.
Use code something like this:
<form action="/sphider/search.php" method="get">
<input type="text" name="query" id="keyword" size="40" value="" autocomplete="off">
<div id="sresults"></div>
<input type="submit" value="Search">
<input type="hidden" name="search" value="1">
</form>
<a href="/sphider/search.php?adv=1"><u>Advanced search</u></a>
Re: include on search.php page
June 19, 2017 08:42AM
Hi Rap

I did check again yes was there my error.

thank you for the reply I want the search results in iframe if I have it linked in the form for search php it just results in that page being displayed. How do I get the results page linked in the form please.

Kated
rap
Re: include on search.php page
June 21, 2017 02:39AM
I have never used iframe. I found this piece of code that may serve as a guide for you.

<iframe src="demo-page.html" name="myFrame"></iframe>
<p><a href="http://www.tutorialrepublic.com" target="myFrame">Tutorial Republic</a></p>

In place of "http://www.tutorialrepublic.com", use the path to your search results page. Having zero experience with iframe, I am GUESSING the "src=" between the iframe tags is unnecessary.
Tec
Re: include on search.php page
June 21, 2017 07:35AM
src= is requirered for iframe like for img tags. Please notice
https://www.w3schools.com/tags/tag_iframe.asp

Tec
rap
Re: include on search.php page
June 21, 2017 04:28PM
Tec - thanks for the info.
Just out of curiosity, I wrote a simple script:

<!DOCTYPE html>
<html>
<body>
<iframe name="myFrame"></iframe>
<p><a href="http://www.sphider.eu/forum/" target="myFrame">Sphider Forum</a></p>
</body>
</html>

I tested it on a variety of browsers (but not EVERY browser there is!) and it worked without error. The frame opened empty, clicked the link and it displayed the link contents.
This does NOT mean your are wrong. The "src" attribute may very well be a requirement and it wouldn't surprise me in the least. This is just a lesson that not every browser FULLY complies to the standards.
Sorry, only registered users may post in this forum.

Click here to login