Hello all,

I feel a little dumb asking this...

I'm trying to pass information from one page to another. I have this:

<a href="http://www.mysite.com?color=red&shape=round">Apple</a>

Now that I do that, on the next page, what kind of code do I use to gather the color and shape information?

Thanks!
~Amy

use the $_GET array. you can "get" those values from the url by using:

$color = $_GET['color'];
$shape = $_GET['shape'];

make sure you validate those as well, especially if you are using those in a database query.

Aha! Silly me :)

Thanks!
~Amy

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.