I've a form class I'm calling from display() method.Then display() method getting value of name,email,password etc by $_POST method.But I want to getting the name of value with out $_POST.And also want to escape html.Is it possible to get value with out $_POST then escape html. Like this formet classname::get('name');
public function display()
{
$newform=new Form();
// Input::get('name');
$newform->setvalue($_POST['name']);
$name=$newform->getvalue();
$newform->setvalue($_POST['email']);
$b=$newform->getvalue();
$newform->setvalue($_POST['pass']);
$c=$newform->getvalue();
$newform->setvalue($_POST['rpass']);
$d=$newform->getvalue();
$newform->setvalue($_POST['phone']);
$e=$newform->getvalue();
}
<?php
class Form
{
private $value;
public function setvalue($value)
{
$this->value=$value;
}
public function getvalue()
{
$a=$this->value;
return $a;
}
}