Jump to content
Sign in to follow this  
kaayasinho

Menu PHP

Recommended Posts

Boa tarde pessoal tudo certo?

 

tnho uma duvida. é correto ( Boa maneira ) eu fazer um menu dessa forma?

    	    <nav>
            	<ul>
                <li><a href="index.php">Home</a></li>
                    <li><a href="?id=empresa">Empresa</a></li>
                    <li><a href="?id=social">Eventos Sociais</a></li>
                    <li><a href="?id=corporativo">Eventos Corporativos</a></li>
                    <li><a href="?id=servicos">Serviços</a></li>
                    <li><a href="?id=contato">Contato</a></li>
                </ul>
            </nav>

PHP

<section> 
           
         	<?php
				if(isset($_GET["id"])){
					
					switch($_GET["id"]){
					
					case"empresa":
						include("empresa.php");
						break;
					case"social":
						include("eventos1.php");
						break;
					case"corporativo":
						include("eventos.php");
						break;	
					case "servicos":
						include("servicos.php");
						break;
					case "contato":
						include("contato.php");
						break;		
					default:
						include("home.php");
						break;
					}
					}else{
						include("home.php");
						}			
			?>
         
</section>

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

Ao usar o fórum, você concorda com nossos Terms of Use.