Search for browsers by means of cumulative adding of URLs without using the search box
Index. php? Chid = 4 & ccid18 = 197
This is a Web site. how can I change the address in the address bar of the browser when I click next link?
Index. php? Chid = 4 & ccid18 = 197 & ccid17 = 166
That is to say, an additional
& Ccid17= 166
Click the next url to overlay it.
Index. php? Chid = 4 & ccid18 = 197 & ccid17 = 166 & ccid18 = 196
Added
& Ccid18= 196
What about this address?
Do not use the search box.
I have a lot of experts here. I solved an important problem here last time. today I am again. thank you very much!
Reply to discussion (solution)
Just define the link
Give your page
For details, I am using a combination of two javascript codes for a search query,
& Ccid18= 196
This connection is a query field.
Therefore, each time a filter is added, one query condition is added, and the queried items are more detailed.
Http://www.lyfcw.com/mobile/search.php? The chid = 4 & ccid1 = 207 & ccid17 = 166 page is here. Now select one option in the drop-down box. there is only one option in the list above. I need to combine the search methods.
That is to say, if I select in the region, the selection still exists when several other options are selected.
Make one or moreWrite down the value required for $ _ GET.
When the client uses js to combine various input types and send them again (submit is not required)
Another method is simpler. php directly writes a js variable whose value is the current URL. then js will be processed ?? Change and replace, add and splice, and then location
Simple is
Jump url = window. location. href + (window. location. href. indexOf ('? ')? '&':'? ') + Ccid name +' = '+ ccid value)
'Http: // '. $ _ SERVER ['http _ host']. $ _ SERVER ['php _ SELF']. '? '. $ _ SERVER ['query _ string'];
This is the current URL
Then you can attach your variable on this basis.
Thank you very much!
'Http: // '. $ _ SERVER ['http _ host']. $ _ SERVER ['php _ SELF']. '? '. $ _ SERVER ['query _ string'];
This is the current URL
Then you can attach your variable on this basis.
Simple is
Jump url = window. location. href + (window. location. href. indexOf ('? ')? '&':'? ') + Ccid name +' = '+ ccid value)
Let's talk about it in detail. I tested it, but I still haven't done it.
You give a test page and describe the requirements
Http://www.lyfcw.com/mobile/search.php? Chid = 4 This is the test page. the requirement is that the region price usage status can be selected at the same time for combined search. Now the region is selected, and the selection of the region does not exist when the purpose is selected.
Now,
This is what I want.
That is to say, the above four filter values cannot be filtered at the same time. to achieve simultaneous filtering, you need to use the access address superposition (& ccid12 = 3032 & ccid1 = 207 & ccid17 = 164) this access mode can be implemented. Just do not know how to overlay
Here is a small example.
1" target="_self">ccid12" target="_self">ccid23" target="_self">ccid34" target="_self">ccid4
To give you a solution, you do not need to change the existing program code
Add the following code at the beginning of search. php
If (! $ _ GET) {// enter clear cookie foreach ($ _ COOKIE as $ k => $ v) setcookie ($ k, '') for the first time ,'');} else {// Save the passed parameters in the cookie foreach ($ _ GET as $ k => $ v) setcookie ($ k, $ v ); // Retrieve the last saved parameter $ _ GET = array_merge ($ _ COOKIE, $ _ GET); // $ _ GET contains the composite query conditions}
Test example
$ V) setcookie ($ k, '');} else {foreach ($ _ GET as $ k => $ v) setcookie ($ k, $ v ); $ _ GET = array_merge ($ _ COOKIE, $ _ GET); print_r ($ _ GET) ;}?>
Less than 5000 RMB-RMB-YuanRmb-15000More than 15000 RMB
Ordinary residenceApartmentBusiness and housingOffice buildingsShopsVillaSiheyuanWarehouseOthers
Can this php be stored in the template file search.html? If you put it in search. php, it will affect the real estate search page of the webpage version. Because they use the same search. php, I want to implement this function on the mobile phone.