SEO Url not changing upon form submission -


am using seo urls load pages ie http://www.mywebsite.com/p/page1/100 having problem search form. when click submit, instead of entire url changing stated 1 in form, appends variables url eg http://www.mywebsite.com/p/page1/100?p=search&q=any+query+string+here.

my question is, how replace entire url form variable instead?

here form code:

<form action="<?php $_server['php_self'] ?>" method="get">     <input type="text" onfocus="if(this.value==this.defaultvalue) this.value='';" onblur="if(this.value=='') this.value=this.defaultvalue;" name="q" value="search" />      <input type="hidden" value="search" name="p" />     <input type="submit" value="search" class="submit" />       </form> 

ok solved using hack think???

apparently if append variable action url, force browser load new url instead of append form variable existing url.

eg.

<form action="<?php $_server['php_self'] ?>?p=search" method="get"> <input type="text" onfocus="if(this.value==this.defaultvalue) this.value='';" onblur="if(this.value=='') this.value=this.defaultvalue;" name="q" value="search" />  <input type="hidden" value="search" name="p" /> <input type="submit" value="search" class="submit" />   </form> 

this worked me dunno if it's right way achieve or it's hack.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -