1
Good evening, I’m trying to select a page to show your content inside the index, but it presents an error and I’m not able to resolves.
Can someone please help me?
Notice: Undefined index: p in C: wamp64 www affiliates2 Welcome.php on line 89
CODE
<div id="collapseOne" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingOne">
<div class="panel-body">
<?php echo " <a href=\"#\"></a> ";
$pagina = $_GET['p']; if(isset($pagina)){include $pagina;} <!--LINNHA DO ERRO-->
?>
</div>
</div>
good evening. The error has been solved but now it is giving blank page, would you tell me why?. I am grateful for your help.
– everson
So, buddy. When the variable
p
was not passed viaGET
, your script has nothing to include. Just you get your URL:http://localhost/index.php?p=pagina_a_ser_incluida.php
.– LipESprY
@Note that my answer is DIRECTLY related to your question. It will not be interesting for you to change the course of your question. I understand you’re having a hard time understanding the subject. In this question, the most I can do is give you a hint about the new problem, which is actually not a mistake, but a misuse of your application... Watch this video that you will understand how this works, since the goal here is to fix problems, and not create a tutorial to teach you everything about method
GET
...– LipESprY
thanks for the help again, now it’s all running well, I saw the bug I had and I made the changes.
– everson