Webbserverprogrammering 1

Show sourcecode

The following files exists in this folder. Click to view.

webbsrvprg/exercises/

class_upg1.php
class_upg2.php
class_upg3.php
class_upg5.php
cookie1.php
cookie2.php
cookie3.php
cookie3form.php
form_mottag.php
form_mottag2.php
form_mottag3.php
formulär.php
hemlighet.php
index.css
index.php
own_fn1.php
own_fn2.php
own_fn3.php
own_fn4.php
own_fn5.php
own_fn6.php
own_gr1.php
own_gr2.php
own_gr3.php
own_gr4.php
own_gr5.php
own_gr6.php

class_upg1.php

26 lines ASCII Windows (CRLF)
<!DOCTYPE html>
<html>
<body>

<?php
class boll {
  public 
$namn;
  public 
$radie;

  function 
set_details($namn, $radie) {
    
$this->namn = $namn;
    
$this->radie = $radie;
  }
  function 
get_details() {
    echo 
"Namn: " . $this->namn . ". Radie: " . $this->radie .".<br>";
  }
}

$basketboll = new boll();
$basketboll->set_details('Basketboll', '25cm');
$basketboll->get_details();
?>
 
</body>
</html>