Is this far from what you think of object oriented PHP, or can I improve it by adding HTML to the class? How can i do this? Note: the code below uses QuickForm on PEAR. Thanks in advance.
<?php
require_once('database/class.mysql.php');
require_once('session/class.session.php');
require_once('access/class.signup.php');
require_once('HTML/QuickForm.php');
require_once('thirdparty/phpmailer/class.phpmailer.php');
require_once('database/dbconnect.php');
$db = &new MySQL($host, $dbUser, $dbPass, $dbName);
$session = new Session;
?>
<html>
<head>
<title>Test page</title>
</head>
<body>
<?php
$form = new HTML_QuickForm('regForm', 'POST');
$form->addElement('header', null, 'Quickform tutorial example!');
$form->addElement('text', 'fname', 'First name:', array('size' => 30));
$form->addRule('fname', 'Please enter your first name', 'required', null, 'client');
$form->addElement('text', 'lname', 'Last name', array('size' => 30));
$form->addRule('lname', 'Please enter your last name', 'required', null, 'client');
$form->addElement('password', 'pass', 'Password: ', array('size' => 30));
$form->addElement('radio', 'sex', 'Gender: ', 'Male', 'male');
$form->addElement('radio', 'sex', '', 'Female', 'female');
$form->addElement('select', 'county', 'County:', array(
'0' => 'Select',
'1' => 'Louth',
'2' => 'Meath'
));
$form->addElement('date', 'dob', 'Date of Birth:', array('format' => 'dMY', 'minYear' => 1950, 'maxYear' => date('Y')));
$form->addElement('submit', null, 'Submit');
if ($form->validate()) {
echo 'Hello';
}
$form->display();
?>
</body>
</html>