Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to include two files by category id
    text
    copied!<p>I have one file that I want to put in this file two other files that they will be dynamic. The main file is this:</p> <pre><code>&lt;!doctype html&gt; &lt;html&gt; &lt;head&gt; &lt;meta charset="utf-8"&gt; &lt;title&gt;Gaming Ventus Let's Play - VLet's Play&lt;/title&gt; &lt;link rel="shortcut icon" href="images/favicon.ico"&gt; &lt;link rel="stylesheet" type="text/css" href="../styles/article_style_readmore.css"&gt; &lt;link rel="stylesheet" type="text/css" href="../../styles/styles_content_static_contact/styles_alltemplate_static_contact.css"&gt; &lt;link rel="stylesheet" type="text/css" href="../styles/readmore_mainbody_style.css"&gt; &lt;link rel="stylesheet" type="text/css" href="../../test/test2/Untitled-3.css"&gt; &lt;/head&gt; &lt;body&gt; &lt;div id="wrapper"&gt; &lt;div id="header"&gt; &lt;div id="top_header"&gt; &lt;ul id="icons"&gt; &lt;li&gt;&lt;a href="http://youtube.com/" target="_blank"&gt;&lt;img src="../../images/youtube-icon.png" alt="YT" width="32" height="32" /&gt;&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://facebook.com/" target="_blank"&gt;&lt;img src="../../images/facebook-icon.png" alt="Fb" width="32" height="32" /&gt;&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://twitter.com/" target="_blank"&gt;&lt;img src="../../images/twitter-icon.png" alt="Twit" width="32" height="32" /&gt;&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://google.com/" target="_blank"&gt;&lt;img src="../../images/google-icon.png" alt="Goog" width="32" height="32" /&gt;&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#" target="_blank"&gt;&lt;img src="../../images/rss-icon.png" alt="Rss" width="32" height="32" /&gt;&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;div id="bottom_header"&gt; &lt;a href="../../index.php?page=home"&gt; &lt;div id="logo"&gt;&lt;img src="../../images/Ventus_Gaming_logo.png"&gt;&lt;/div&gt; &lt;/a&gt; &lt;div id="search_bar"&gt; &lt;form&gt; &lt;input type="text" id="search"&gt; &lt;label for="search"&gt;Search&lt;/label&gt; &lt;/form&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;div id="menu"&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="../../index.php?page=home"&gt;Home&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="../../index.php?page=reviews"&gt;Reviews&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="../../index.php?page=news"&gt;News&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="../../index.php?page=videos"&gt;Videos&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="../../index.php?page=photos"&gt;Photos&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="../../content_static_main_body/contact.php?page=contact"&gt;Contact Us&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;div id="main_body"&gt; &lt;div id="main_left_nav"&gt; /****************************************************************\ &lt;?php include('function_art_result_readmore.php'); include('function_art_result_readmore_photos.php'); ?&gt; \****************************************************************/ &lt;/div&gt; &lt;div id="right_nav"&gt; &lt;div id="right_nav_about"&gt; About! &lt;/div&gt; &lt;div class="right_nav_others"&gt; Reviews! &lt;/div&gt; &lt;div class="right_nav_others"&gt; News! &lt;/div&gt; &lt;div class="right_nav_others"&gt; Videos! &lt;/div&gt; &lt;div class="right_nav_others"&gt; Photos! &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;div id="footer"&gt; &lt;p&gt;Copyright Ventus Gaming&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;?php //Ayto einai to apotelesma otan patas to read more dhladh ta post mona tous ?&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>So in the asterisk section I have this two files that I want to include... That files have mysql code and php code. So I want to include them like something like this:</p> <pre><code>&lt;?php if ($CatID == 8) { include('function_art_result_readmore.php'); } else { include('function_art_result_readmore_photos.php'); } ?&gt; </code></pre> <p>But this is not working, is just for example. So I want to open the include file by category id so I have both files whenever I want. Of course if there is another solution I accept it :) </p> <p>Thank you in advance! </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload