First of all, your variable $title doesn't seem to be defined anywhere in the scope of the code you have shared.
Nonetheless, I can share four ways to handle this.
1. By having title as a member of the class myClass, which would be specific for every instance of that class
class myClass {
    public $title = '';
  function form() {
      echo '<input type="text" value="'.$this->title.'" />';
   }
}
$myClass = new myClass();
$myClass->title = 'My title';
2. By using a constant within the class, which will be the same on all myClass class instances
class myClass {
     const title = 'My title';
  function form() {
      echo '<input type="text" value="'.myClass::title.'" />';
   }
}
3. Passing the variable to the function you will be calling
class myClass {
  function form($title) {
      echo '<input type="text" value="'.$title.'" />';
   }
}
$myClass = new myClass();
$myClass->form('My title');
4. Using a global variable like you are trying to do.
Please, use global variables with caution. Don't use them if you don't need to as explained here and here.
$title = 'My title';
class myClass {
    function form() {
        global $title; // <-- declare here that we will use the global variable $title
        echo '<input type="text" value="'.$title.'" />';
    }
}