First Draft
First Draft of the Example Files
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
$object = new Subscriber;
|
||||
$object->name = "Fred";
|
||||
$object->password = "pword";
|
||||
$object->phone = "012 345 6789";
|
||||
$object->email = "fred@bloggs.com";
|
||||
$object->display();
|
||||
|
||||
class User
|
||||
{
|
||||
public $name, $password;
|
||||
|
||||
function save_user()
|
||||
{
|
||||
echo "Save User code goes here";
|
||||
}
|
||||
}
|
||||
|
||||
class Subscriber extends User
|
||||
{
|
||||
public $phone, $email;
|
||||
|
||||
function display()
|
||||
{
|
||||
echo "Name: " . $this->name . "<br>";
|
||||
echo "Pass: " . $this->password . "<br>";
|
||||
echo "Phone: " . $this->phone . "<br>";
|
||||
echo "Email: " . $this->email;
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user