Vtiger Webform问题

时间:2012-09-07 09:12:16

标签: vtiger

我正在尝试将数据存储在vtiger引导模块中。我可以通过file_get_contents()发送变量 但它不起作用。这是我的代码  

$moduleName = $_POST['moduleName']; 
$company    = $_POST['company']; 
$firstname  = $_POST['firstname'];
$lastname   = $_POST['lastname']; 
$website    = $_POST['website']; 
$phone      = $_POST['phone']; 
$email      = $_POST['email']; 
$city       = $_POST['city']; 
$state      = $_POST['state'];
$code       = $_POST['code']; 

$post = http_build_query(array(

"firstname" => "$firstname",
"lastname" => "$lastname",
"website"=>"$website",
"phone"=>"$phone",
"email"=>"$email",
"city"=>"$city",
"state"=>"$state",
"code"=>"$code",
 "moduleName" => "$moduleName",
   "company " => "$company",

));

 $context = stream_context_create(array("http"=>array(
 "method" => "POST",
 "header" => "Content-Type: application/x-www-form-urlencoded\r\n" .
             "Content-Length: ". strlen($post) . "\r\n",  
 "content" => $post,
))); 

$page = file_get_contents("http://vtiger.com/modules/Webforms/post.php", false, $context);

请帮帮我。

1 个答案:

答案 0 :(得分:0)

正确使用网络表单,在vtiger 5.4中,您可以通过其界面轻松创建网页表单。 oru用户vtiger webservices创建,编辑,删除数据