Page 1 of 1

PHP page Forward

Posted: Mon Aug 17, 2009 2:17 pm
by TravisT6983
ok i am trying to create city pages such as birmingham.php that all it does is forward to the search result for birmingham we are a real estate company that is trying to get some better SEO with all our surrounding citys... our search results page land on listings.php

i have done this to our footer of each page with this form action

Code: Select all

 
<form name="Birmingham" action="listings.php" method="post">
                <input type="hidden" name="searchType" value="custom">
              <input type="hidden" name="newSearch" value="true">
              <input type="hidden" name="table" value="rs">
              <input type="hidden" name="city" value="2192">
              <input type="hidden" name="beforeListPrice" value="0">
              <input type="hidden" name="afterListPrice" value="any">
              <input type="hidden" name="featuredOnly" value="false">
</form>   
<a href="javascript&#058;void[0];" onclick="document.forms['Birmingham'].submit(); return false;">Birmingham</a>
 
is it possible to use this form action in like a PHP header forward?

Code: Select all

 
<?php
header("location: javascript&#058;void[0]; onclick="document.forms['Birmingham'].submit(); return false;"");
?>
Any suggestions on this would be a great help
Thank You

Re: PHP page Forward

Posted: Mon Aug 17, 2009 2:33 pm
by jackpf
No.

But you could do something like this:

Code: Select all

window.onload = function(){document.forms['Birmingham'].submit();}
But wait...you're going to make a script for every city?

Re: PHP page Forward

Posted: Mon Aug 17, 2009 2:38 pm
by TravisT6983
i dont quite understand your code? can u elaborate a little further?

not every city but like 10 or so city's?

thanks

Re: PHP page Forward

Posted: Mon Aug 17, 2009 3:50 pm
by jackpf
That code is javascript that will submit the form when the page is loaded. Is that not what you want?

And that sounds awful!!
Why not write one script that handles multiple cities?