Page 1 of 1

How to pass array to new window without form

Posted: Wed Oct 27, 2010 5:37 am
by shahzad429
I am working on search result page where all the thumbnail will display and its working fine.

but what my boss wants is when user click on any thumbnail a new window will open with the product image and next and prev button

so that user will navigate search result through new window

so how i can pass all the ID to new window so that this funtionality can be done


thanks in advance..

Re: How to pass array to new window without form

Posted: Wed Oct 27, 2010 10:16 am
by VladSun
Use GET:

newwin.php?id1=453543&id2=5435&id3=543543

Re: How to pass array to new window without form

Posted: Fri Oct 29, 2010 3:36 pm
by xtiano77
I just read about this very thing a few days ago in the PHP Certification book and this is what I saw:

http://www.yoursiteaddress.com?items[]= ... =whatever3

The outcome will be:

Code: Select all

$_GET[“items”][0] = “whatever1”;
$_GET[“items”][1] = “whatever2”;
$_GET[“items”][2] = “whatever3”;
You do not have to worry about indexing the array because PHP does that automatically for you.

Hope this helps.