Hide or show a div using data sent to a php file

PHP

This tutorial will help you to send data to a php file to hide a div ie sending a string to a php file to hide a div.Follow these steps.

1 : Open the php file which contains the div to hide. 

     Paste this code above the  tag

<blockquote class="tr_bq">
  <p>
    <b><style type=&#8221;text/css&#8221;></b><b><span style="font-family: Times, 'Times New Roman', serif;">#<?php echo $_GET[&#8216;div&#8217;]; ?>{</span></b><b><span style="font-family: Times, 'Times New Roman', serif;"><span style="color: red;">display:none;</span></span></b><b><span style="font-family: Times, 'Times New Roman', serif;">}</span></b><b><span style="font-family: Times, 'Times New Roman', serif;"></style></span></b>
  </p>
</blockquote>

If you want to show a div change the line “display:none;” to “display:block;”

2 : Paste the div code with an id on the php file. 

     

Hello World

<p>
  <span style="font-family: Times, 'Times New Roman', serif;">3 : If the name of the file you just typed is &#8220;<b>main&#8221; </b>and the url of the file is <b>&#8220;http://example.com/main&#8221; </b>then if you want to hide you have to type the url like this. <b>&#8220;http://example.com/main?div=hide&#8221; </b>. After going to this url the div id <b>&#8220;hide&#8221;</b></span><b style="font-family: Times, 'Times New Roman', serif;">&nbsp;</b><span style="font-family: Times, 'Times New Roman', serif;">will be hidden.</span></div> </div>