problems to get a variable


I'm trying to fetch a variable that I get through GET in another php file before html in my index.php , that is from my index php through a link I bring a content to my index since my application is in modules and I am using friendly URLs but I need to generate a description on the meta description tag of the content that I bring from my php file.

The application works on modules in split php

after the header


//some more javascript tags and css....

//navbar etc...

then I get the view variable of my htaccess file to bring the modules and the URLs are friendly ...


      if (isset($_GET["view"])) {

         echo"<input type='hidden' id='section' value='$view[0]'>";

            //echo" <script src='URLSERVERjs/script.js'></script>";




Then in the start module is the page index.php I have some posts that I get through a query to the BD the results of that query I printed them on a a tag to take me to see that post in a module. The thing is that once I click on that link to go see the post I need to bring a variable to the header of my file index.php to add the description of that post to the tag meta description

This is for the purpose of SEO positioning in search results in google

Try the following in the header of my index with isset of php but it does not work for me

if (isset($description)) {



although in the module to see that post I declare the variable description and then try to read it in the header this always prints nothing

asked by andy gibbs 06.12.2018 в 07:35

0 answers