<?xml version="1.0" encoding="UTF-8"?>    <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
      <channel>
        <title>Hiding default search results</title>
        <link>https://interactivetools.com/forum/forum-posts.php?Hiding-default-search-results-79921</link>
        <description></description>
        <pubDate>Wed, 11 Nov 2026 14:46:24 -0700</pubDate>
        <language>en-us</language>
        <atom:link href="https://interactivetools.com/forum/forum-posts.php?rss=1&amp;Hiding-default-search-results-79921" rel="self" type="application/rss+xml" />

                <item>
          <title>Hiding default search results</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2236118#post2236118</link>
          <description><![CDATA[<p>Yeah - probably the easiest way is to check the dealer records inside the loop, and add a continue statement if the record's distance is higher than the chosen distance so that it skips those before outputting anything.</p>]]></description>
          <pubDate>Wed, 18 Feb 2015 11:11:48 -0800</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2236118#post2236118</guid>
        </item>
                <item>
          <title>Hiding default search results</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2236116#post2236116</link>
          <description><![CDATA[<p>Hi, Claire.</p>
<p>There's a drop down menu where people can choose the distance from the location they've typed in; i.e. 10, 50 or 100km. Is there a way of excluding any results that exceed the chosen distance? So if they choose, say, 10km, nothing further than that is shown?</p>
<p>Thanks.</p>]]></description>
          <pubDate>Wed, 18 Feb 2015 10:24:14 -0800</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2236116#post2236116</guid>
        </item>
                <item>
          <title>Hiding default search results</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2236104#post2236104</link>
          <description><![CDATA[<p>Works perfectly! :-)</p>
<p><a href="http://mdldoorsystems.com/dealer.php" rel="nofollow">http://mdldoorsystems.com/dealer.php</a></p>]]></description>
          <pubDate>Tue, 17 Feb 2015 06:26:32 -0800</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2236104#post2236104</guid>
        </item>
                <item>
          <title>Hiding default search results</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2236078#post2236078</link>
          <description><![CDATA[<p>Aah, thank you!</p>]]></description>
          <pubDate>Mon, 16 Feb 2015 05:58:19 -0800</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2236078#post2236078</guid>
        </item>
                <item>
          <title>Hiding default search results</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2236065#post2236065</link>
          <description><![CDATA[<p>Looks like a different variable name - just change this line:</p>
<p><code>&lt;?php if(@$_REQUEST['maxDistance'] != "") : ?&gt;</code></p>
<p><span>to</span></p>
<p><code>&lt;?php if(@$_REQUEST['distance'] != "") : ?&gt;</code></p>
<p>This code checks to see if the distance dropdown has been selected, and it'll only show the results then. But the variable name needs to match what it's called in the dropdown.</p>]]></description>
          <pubDate>Fri, 13 Feb 2015 09:20:45 -0800</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2236065#post2236065</guid>
        </item>
                <item>
          <title>Hiding default search results</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2236062#post2236062</link>
          <description><![CDATA[<p>Hi, Clare.</p>
<p>I tried this code, and while it hides the default list of every record, it also doesn't show any results when I run a search. <a href="http://mdldoorsystems.com/dealer-interactive.php" rel="nofollow">http://mdldoorsystems.com/dealer-interactive.php</a> Any idea where I'm going wrong, please?</p>
<p><code>&lt;?php if(@$_REQUEST['maxDistance'] != "") : ?&gt;<br /> &lt;?php foreach ($dealersRecords as $record): ?&gt;<br /> &lt;td&gt;<br /><br /> &lt;TABLE WIDTH="100" BORDER="0" CELLPADDING="0" CELLSPACING="0" ID="Product"&gt;<br /> &lt;TR&gt;<br /> &lt;TD&gt;&lt;P&gt;&lt;a href="&lt;?php echo $record['_link'] ?&gt;"&gt;&lt;?php echo $record['title'] ?&gt; &amp;raquo; &lt;/A&gt;&lt;BR&gt;<br /> &lt;?php echo $record['city'] ?&gt;, &lt;?php echo $record['province'] ?&gt;, &lt;?php echo $record['postcode'] ?&gt;&lt;/P&gt;<br /> &lt;?php if (@$record['_distance']): ?&gt;<br /> &lt;p&gt;Distance: &lt;?php echo round($record['_distance'],1) ?&gt; KM&lt;/P&gt;<br /> &lt;?php endif ?&gt;<br /> &lt;/TD&gt;<br /> &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;<br /> &lt;/TR&gt;<br /> &lt;TR&gt;<br /> &lt;TD&gt;&lt;IMG SRC="images/single-pixel.gif" WIDTH="369" HEIGHT="1"&gt;&lt;/TD&gt;<br /> &lt;TD&gt;&lt;IMG SRC="images/single-pixel.gif" WIDTH="10" HEIGHT="1"&gt;&lt;/TD&gt;<br /> &lt;/TR&gt;<br /> &lt;/TABLE&gt;<br /><br /> &lt;/td&gt;<br /> &lt;?php $maxCols=2; if (@++$count % $maxCols == 0): ?&gt;<br /> &lt;/tr&gt;<br /> &lt;tr&gt;<br /> &lt;?php endif ?&gt;<br /><br /> &lt;?php endforeach; ?&gt;<br /> &lt;?php endif; ?&gt;</code></p>
]]></description>
          <pubDate>Fri, 13 Feb 2015 07:34:41 -0800</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2236062#post2236062</guid>
        </item>
                <item>
          <title>Hiding default search results</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2236052#post2236052</link>
          <description><![CDATA[<p>Okay, it should look like this:</p>
<p><code><strong>&lt;?php if(@$_REQUEST['maxDistance'] != "") : ?&gt;</strong><br />&lt;?php foreach ($dealersRecords as $record): ?&gt;<br /><br />.....<br /><br /><br />&lt;?php endforeach; ?&gt;<br /><strong>&lt;?php endif; ?&gt;</strong></code></p>
<p>Obviously just add the usual stuff in the foreach loop there.</p>]]></description>
          <pubDate>Thu, 12 Feb 2015 15:41:09 -0800</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2236052#post2236052</guid>
        </item>
                <item>
          <title>Hiding default search results</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2236044#post2236044</link>
          <description><![CDATA[<p>Hi, Clare.</p>
<p>Sorry, I don't know how to do this. Line 245 is</p>
<p><code>&lt;?php foreach ($dealersRecords as $record): ?&gt;</code></p>
<p>so what should I add, please?</p>
<p>Thanks.</p>]]></description>
          <pubDate>Thu, 12 Feb 2015 11:58:30 -0800</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2236044#post2236044</guid>
        </item>
                <item>
          <title>Hiding default search results</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2236031#post2236031</link>
          <description><![CDATA[<p>Yeah - on line 245, just before the dealers records loop, add an if-statement to check if the $_REQUEST['maxDistance'] is set. Then only run the loop to display the records if it's there.</p>
<p>Presumably, if it's not there, then no search has been performed and the default record display has to be skipped.</p>]]></description>
          <pubDate>Wed, 11 Feb 2015 13:19:42 -0800</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2236031#post2236031</guid>
        </item>
                <item>
          <title>Hiding default search results</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2236029#post2236029</link>
          <description><![CDATA[<p>Hi, All.</p>
<p>Can anyone tell me if there's an easy way to hide the default listings that are showing up under the search field on this page, please? <a href="http://mdldoorsystems.com/dealer.php" rel="nofollow">http://mdldoorsystems.com/dealer.php</a></p>
<p>Thanks!</p>]]></description>
          <pubDate>Wed, 11 Feb 2015 12:21:28 -0800</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2236029#post2236029</guid>
        </item>
              </channel>
    </rss>
  