<?php
function add_form($facilitated_by,$requested_by,$person_id,$description,$type = "GOODS_RETURN_FORM",$person_type = ST_CUSTOMER,$user = '')
{
	$sql = "INSERT INTO ".TB_PREF."printable_forms (facilitatedby,requestedby,person_id,description,type,person_type,user) "
                . "VALUES (".db_escape($facilitated_by) . ",".db_escape($requested_by) . ","
                . "".db_escape($person_id) . ",".db_escape($description) . ",".db_escape($type) . ""
                . ",".db_escape($person_type) . ",".db_escape($user) . ")";
   	db_query($sql,"The sprintable form could not be added");
}
function get_form($selected_id)
{
	$sql = "SELECT *  FROM ".TB_PREF."printable_forms WHERE id=".db_escape($selected_id);

	$result = db_query($sql,"could not get printable form");
	return db_fetch($result);
}