KYRALEKOS

ΤΕΔ 12/11/19 PHP

Nov 12th, 2019
325
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 5.96 KB | None | 0 0
  1. <?php
  2.     echo "hello world!";
  3. ?>
  4.  
  5. /////////////////////////////////////
  6. <?php
  7. $name =" rob";
  8.  
  9. echo "<p>my name is $name</p>";
  10. $string1="<p>this is the first part";
  11. $string2="of a sentence</p>";
  12. echo $string1." ".$string2;
  13. $mynumber = 45;
  14. $calculation =$mynumber * 31/ 97 + 4;
  15. echo $calculation;
  16. ?>
  17. //////////////////////////////////////conditions
  18. <?php
  19. $age=15;
  20. if($age>=18){
  21.     echo "you can enter";
  22.  
  23. }else{
  24.     echo "you are not allowed to come in";
  25. }
  26.  
  27.  
  28. ?>
  29. /////////////////////////////////////////
  30.  
  31. <?php
  32. $user=" robin";
  33. if($user==" rob"){
  34.     echo "hello rob";
  35.  
  36. }else{
  37.     echo "i dont know you";
  38. }
  39.  
  40.  
  41. ?>
  42. ///////////////////////////////////////loops
  43. <?php
  44.  
  45. for($i=0; $i <=10; $i++){
  46.    
  47.     echo $i."<br>";  //vazw .br gia na typwnetai kathe fora se nea grammh anti gia +
  48. }
  49.  
  50.  
  51. ?>
  52.  
  53. /////////////////////////////////////////while loop
  54. <?php
  55. $i=0;
  56. while($i <=10){    //arxikopoioume apeksw to i
  57.    
  58.     echo $i."<br>";
  59.     $i++;
  60. }
  61.  
  62.  
  63. ?>
  64. ////////////////////////////////////////
  65. <?php
  66. if(isset($_GET['name'])){
  67.     echo "hi there ".$_GET['name']."!";
  68. }
  69. ?>
  70. <p>whats your name?</p>
  71. <form>
  72. <input name="name" type="text">
  73. <input type ="submit" value="go!">
  74. </form>
  75. /////////////////////////////////////////////////////////BOOTSTRAP-MIKRAINW TO PARATHYRO ALLAZEI H TOPOTHESIA TWN ANTIKEIMENWN
  76. <!doctype html>
  77. <html lang="en">
  78.   <head>
  79.     <!-- Required meta tags -->
  80.     <meta charset="utf-8">
  81.     <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  82.  
  83.     <!-- Bootstrap CSS -->
  84.     <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
  85.  
  86.     <title>Hello, world!</title>
  87.   </head>
  88.   <body>
  89.     <h1>Hello, world!</h1>
  90.     <div class="container">
  91.         <div class="row">
  92.             <div class="col-sm">
  93.                 one of three columns
  94.             </div>
  95.             <div class="col-sm">
  96.                 one of three columns
  97.             </div>
  98.             <div class="col-sm">
  99.                 one of three columns
  100.             </div>
  101.         </div>
  102.     </div> 
  103.     <!-- Optional JavaScript -->
  104.     <!-- jQuery first, then Popper.js, then Bootstrap JS -->
  105.     <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
  106.     <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
  107.     <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
  108.    
  109.   </body>
  110. </html>
  111. ////////////////////////////////////////////////////////////////////////////
  112. <!doctype html>
  113. <html lang="en">
  114.   <head>
  115.     <!-- Required meta tags -->
  116.     <meta charset="utf-8">
  117.     <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  118.  
  119.     <!-- Bootstrap CSS -->
  120.     <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
  121.  
  122.     <title>Hello, world!</title>
  123.   </head>
  124.   <body>
  125.   <nav class="navbar navbar-expand-lg navbar-light bg-light">
  126.   <a class="navbar-brand" href="#">Navbar</a>
  127.   <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
  128.     <span class="navbar-toggler-icon"></span>
  129.   </button>
  130.  
  131.   <div class="collapse navbar-collapse" id="navbarSupportedContent">
  132.     <ul class="navbar-nav mr-auto">
  133.       <li class="nav-item active">
  134.         <a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
  135.       </li>
  136.       <li class="nav-item">
  137.         <a class="nav-link" href="#">Link</a>
  138.       </li>
  139.       <li class="nav-item dropdown">
  140.         <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  141.           Dropdown
  142.         </a>
  143.         <div class="dropdown-menu" aria-labelledby="navbarDropdown">
  144.           <a class="dropdown-item" href="#">Action</a>
  145.           <a class="dropdown-item" href="#">Another action</a>
  146.           <div class="dropdown-divider"></div>
  147.           <a class="dropdown-item" href="#">Something else here</a>
  148.         </div>
  149.       </li>
  150.       <li class="nav-item">
  151.         <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a>
  152.       </li>
  153.     </ul>
  154.     <form class="form-inline my-2 my-lg-0">
  155.       <input class="form-control mr-sm-2" type="search" placeholder="Search" aria-label="Search">
  156.       <button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
  157.     </form>
  158.   </div>
  159. </nav>
  160.     <h1>Hello, world!</h1>
  161.     <div class="container">
  162.         <div class="row">
  163.             <div class="col-sm">
  164.                 one of three columns
  165.             </div>
  166.             <div class="col-sm">
  167.                 one of three columns
  168.             </div>
  169.             <div class="col-sm">
  170.                 one of three columns
  171.             </div>
  172.         </div>
  173.     </div> 
  174.    
  175.     <!-- Optional JavaScript -->
  176.     <!-- jQuery first, then Popper.js, then Bootstrap JS -->
  177.     <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
  178.     <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
  179.     <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
  180.    
  181.   </body>
  182. </html>
Add Comment
Please, Sign In to add comment