Input button hide based url

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>&nbsp;";
echo "<INPUT type=\"submit\" name=\"add\" value=\"&nbsp;\" id=\"lisaa\" class=\"add-to-basket\">";

How do I hide it if the user is browsing product_catalog.php?c=12?


Use a simple if statement to check if $_GET['c'] is not equal to 12:

if($_GET['c'] != '12') {
  // put your echo statements here.

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:

PHP Manual: Control Structures PHP Manual: if PHP Manual: Superglobals

Need Your Help

Timeout error when loading Xml from URL

c# xml

I am doing task of loading the live xml file (from live url) to XmlDataDocument, but every time I am getting error:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.