1
I’m making a mistake, let’s say, primary kkkk
I have a page made in html updated by php.
My problem is to load the contents of a div.
I have a text. By clicking on this text it loads the content into a div, only this content is a php page, for example teste.php
.
The question is.... How to do this?
OBS.:I have a file, below (regras.php
)
<?php switch($_GET["pagina"])
{
case "adestraBasic":
$var_conteudo="AdestraBasic.php";
break;
case "advance":
$var_conteudo="Advance.php";
break;
default: $var_conteudo="AdestraBasic.php";
}
?>
And on the page I have:
<?php include "regras.php";?>
The div:
<div id="PHP">
<?php include $var_conteudo; ?>
</div>
Page:
<head>
<link href="style.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>
<div id="wrapper">
<div id="page">
<div id="page-bgtop">
<div id="page-bgbtm">
<div id="content">
<div class="post">
<h2 class="title">curso da iron dog</h2>
<div id="PHP">
<?php include $var_conteudo; ?>
</div>
</div>
</div>
<!-- end #content -->
<div id="sidebar">
<ul>
<li> </li>
<li>
<h2>Cursos</h2>
<ul>
<li><a href="#">1 Adestramento Basico</a></li>
<li><a href="#">2 Adestramento Avançado</a></li>
<li><a href="#">3 Agility</a></li>
<li><a href="#">4 Cães de Policia</a></li>
<li><a href="#">5 Figurante</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<!-- end #sidebar -->
<div style="clear: both;"> </div>
</div>
</div>
</div>
<!-- end #page -->
</div>
</body>