PHP includes help (20 Characters)?
Ok, I know how to use the built in include function, but it says the path for line 49 is wrong, there isn't even a line 49.
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>HTML Form All Validated</title>
</head>
<body>
<?php
include 'QuickForm2.php';
$form = new QuickForm2('Create', 'post', basename(__FILE__));
$opts = array('size' => 20, 'maxlength' => 255);
$form -> addElement('static', 'header', 'null',
'<h1>Register</h1'
);
$form->addElement('text', 'first_name', 'First Name', $opts);
$form->addElement('text', 'last_name', 'Last Name', $opts);
$form->addElement('text', 'login', 'Login Name', $opts);
$form->addElement('password', 'password', 'Password', $opts);
$form->addElement('text', 'email', 'E-Mail', $opts);
$form->addElement('static', 'valid', null,
'<strong>E-Mail address must be valid, and will only be'.
'used for account verification.</strong>'
);
$form->addElement('textarea', 'signature', 'Signature',
array('rows' => 10, 'cols' => 20));
$form->addElement('file', 'avatar', 'Avatar Image');
$form->addElement('static', 'reqs', null,
'<strong>Image <em>must</em> be no more than 64x64 pixels' .
'in size</strong>'
);
$form->addElement('submit', 'register', "Register Now!");
$formsource = $form->toHtml();
?>
</body>
</html>
I figured out the problem. In the PEAR files I downloaded to generate the forms, it didn't include Common.php or Common2.php which are required. I just have to find them and download them now and it should all work. Thanks for your help man, you get the best answer.