I have a class which is maintain guest information. So in that class I have following method to insert guest data into a guest_info table
require_once "BaseModel.php";
class GuestModel extends BaseModel
{
public static $table = "guest_info";
public static function guestInfoFormData(){
$title = $_POST['title'];
$firstname = $_POST['firstname'];
$lastname = $_POST['lastname'];
$nicpassport = $_POST['nicpassport'];
$contactnumber = $_POST['contactnumber'];
$addressline1 = $_POST['addressline1'];
$addressline2 = $_POST['addressline2'];
$addressline3 = $_POST['addressline3'];
$country = $_POST['country'];
$guestinfo = array($title,$firstname,$firstname,$nicpassport,$addressline1,$addressline2,$addressline3,$country);
insertInto($guestinfo);
}
}
How can I call this method from my HTML form and pass the guest data to it?