I am trying to hide an input button hide when the specific URL product_catalog.php?c=12 is loaded.
Here is my button code in product_catalog.php:
echo "<INPUT type=\"text\" name=\"qty\" size=2 value=\"1\" class=\"text-pc\"><span class=\"small2\">kpl</span> ";
echo "<INPUT type=\"submit\" name=\"add\" value=\" \" id=\"lisaa\" class=\"add-to-basket\">";
How do I hide it if the user is browsing product_catalog.php?c=12?
Use a simple
ifstatement to check if$_GET['c']is not equal to12:Note that this is a fairly simple question about a base control structure of PHP. You might want to learn more about control structures by reading the PHP Manual before continuing with your project.
Concepts touched in this answer: