homepage Welcome to WebmasterWorld Guest from 54.161.175.231
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
$ GET , multiple values
joergnw10




msg:3626506
 3:52 pm on Apr 14, 2008 (gmt 0)

Sorry if this is a very basic question, but I don't really know any php and couldn't figure out how to solve this:
I have the following code which works fine. What I would like to do is have it return apartments not just for 'Norway', but also for one or more other countries, i.e. 'Sweden'...
Could someone please let me know how to change the code? I tried all sorts of separators but without success.
Thanks very much!

<?require_once($config['basepath'].'/include/search.inc.php');
$search = new search_page();
$_GET['country']='Norway';
$_GET['type']='Apartment';
$display2 = $search->search_results();
echo $display2;?>

 

jatar_k




msg:3626543
 4:40 pm on Apr 14, 2008 (gmt 0)

I don't know if it would work

is there anywhere on your site where it already calls more than one? if not then you will have to dig into search_results() and see how it issues queries to the database

you could also try doing that code twice and put Sweden in the second time

joergnw10




msg:3626588
 5:37 pm on Apr 14, 2008 (gmt 0)

Excellent. It does work with two separate lines - thanks very much!

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved