Hi all,
Paint me confused here. I was under the impression that variables passed in an HTML <a href...> would be passed in the URL to the next page. Am I wrong?
For example, I have two pages, the first is an HTML page with 3 simple links in it:
<a href="category.php?sku=11111">By SKU#1</a>
<a href="category.php?sku=12345">By SKU#2</a>
<a href="category.php?sku=12222">By SKU#3</a>
Then, on category.php, where the posting is taking place, I have this:
<?
$sku = $_GET["sku"];
?>
<html>
<head>
<title>BLAH</title>
</head>
<body>
<p>You are Looking For SKU #: [code=php]<? echo "$sku"; ?>
</p>
</body>
</html>
[/code]
Now, everything works correctly. The SKU from the associated <A HREF> tag are placed correctly in $sku on this page. The confusing thing to me though is that they URL remains the same even after I am transferred to the .php page, which is "http://localhost/cattest.html" !!
Help me out here, but my understanding of $_GET tells me the URL should be something like "http://localhost/category.php?sku=11111",not the plain-jane URL that I am getting even after clicking the hyperlink.
Any idea why this is happening?
Thanks,
Justin