Last active
November 26, 2020 10:41
-
-
Save djoudi/663858359311abab2b3ba28adcbf75e7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <p class="lead"> | |
| <h1>Contact Page</h1> | |
| </p> | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <!-- Required meta tags --> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
| <link rel="stylesheet" href="css/font-awesome.min.css" > | |
| <!-- Bootstrap CSS --> | |
| <link rel="stylesheet" href="css/bootstrap.min.css" > | |
| <title>Web3</title> | |
| </head> | |
| <body> | |
| <ul class="list-group list-group-horizontal"> | |
| <li class="list-group-item"><a href="index.php">Home</a></li> | |
| <li class="list-group-item"><a href="index.php?page=service">Service</a></li> | |
| <li class="list-group-item"><a href="index.php?page=product">Product</a></li> | |
| <li class="list-group-item"><a href="index.php?page=contact">Contact</a></li> | |
| </ul> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| include 'inc/header.php'; | |
| ?> | |
| <?php | |
| //print_r($_GET); | |
| //?ecoin=web&nom=php&version=8 // Query String | |
| //isset empty | |
| $page = (isset($_GET['page']))?$_GET['page']:null; | |
| /* if (!empty($page)) { | |
| include $page.'.php'; | |
| } | |
| */ | |
| switch ($page) { | |
| case 'service': | |
| include 'service.php'; | |
| break; | |
| case 'product': | |
| include 'product.php'; | |
| break; | |
| case 'contact': | |
| include 'contact.php'; | |
| break; | |
| default: | |
| echo "<h1>This Index Page</h1>"; | |
| break; | |
| } | |
| ?> | |
| <div class="container"> | |
| <div class="row"> | |
| <div class="col"> | |
| <form action="rev.php" method="get"> | |
| <div class="form-row"> | |
| <div class="form-group col-md-6"> | |
| <label for="page">Page</label> | |
| <input type="text" name="page" class="form-control" id="page" > | |
| </div> | |
| </div> | |
| <button type="submit" class="btn btn-primary">Get Page</button> | |
| </form> | |
| </div> | |
| </div> | |
| </div> | |
| <?php | |
| include 'inc/footer.php'; | |
| ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <p class="lead"> | |
| <h1>Product Page</h1> | |
| </p> | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| echo $_GET['page']; | |
| ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <p class="lead"> | |
| <h1>Service Page</h1> | |
| </p> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment