Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class material {
- public $nazwa;
- public $waga;
- public $wymiar;
- public $kolor;
- public $dlugosc;
- public $szerokosc;
- public function construct($nazwa, $waga, $wymiar, $kolor, $dlugosc, $szerokosc)
- {
- $this->nazwa = $nazwa;
- $this->waga = $waga;
- $this->wymiar = $wymiar;
- $this->kolor = $kolor;
- $this->dlugosc = $dlugosc;
- $this->szerokosc = $szerkosc;
- }
- public function wyswietl()
- {
- echo'
- <table>
- <tr><td>nazwa: </td><td> '.$this->nazwa.'</td></tr>
- <tr><td>waga: </td><td> '.$this->waga.'</td></tr>
- <tr><td>wymiar: </td><td> '.$this->wymiar.'</td></tr>
- <tr><td>kolor: </td><td> '.$this->kolor.'</td></tr>
- <tr><td>dlugosc: </td><td> '.$this->dlugosc.'</td></tr>
- <tr><td>szerokosc: </td><td> '.$this->szerokosc.'</td></tr>
- </table>';
- }
- public function wprowadz($nazwa, $waga, $wymiar, $kolor, $dlugosc, $szerokosc)
- {
- $this->nazwa = $nazwa;
- $this->waga = $waga;
- $this->wymiar = $wymiar;
- $this->kolor = $kolor;
- $this->dlugosc = $dlugosc;
- $this->szerokosc = $szerkosc;
- }
- public function otworzplik(){
- }
- }
- $element= new material();
- $element->wyswietl();
- ?>
- <!DOCTYPE html>
- <head>
- <title>Materialy</title>
- </head>
- <body>
- <form action="skrypt1.php" method="get">
- nazwa: <input type="text" size"20" maxlength="20" name="nazwa"></br>
- waga: <input type="text" size"20" maxlength="20" name="waga"></br>
- wymiar: <input type="text" size"20" maxlength="20" name="wymiar"></br>
- kolor: <input type="text" size"20" maxlength="20" name="kolor"></br>
- dlugosc: <input type="text" size"20" maxlength="20" name="dlugosc"></br>
- szerokosc: <input type="text" size"20" maxlength="20" name="szerokosc"></br>
- <input type="submit" value="Wyslij">
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement