好吧,我正在开发一个带有复制中心系统的基于 CMS 的表单(这是表单),但我需要 $cookie->id_customer。但我得到一个错误:
致命错误:在第 13 行的 /home/papelari/public_html/modules/mymodule/submit.php 中的非对象上调用成员函数 isLogged()
<?php
/*
$con = mysql_connect("localhost","papelari","509494218");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("papelari_Veloso", $con); */
global $cookie;
if(!$cookie->isLogged())
{
echo 'Please login';
exit;
}
else
{
echo 'Hi, ' . $cookie->customer_firstname. ' ' .$cookie->customer_lastname . '<br/>';
echo 'We contact to you: '. $cookie->email;
}
/* $sql="INSERT INTO ps_copias (id_customer, file, cor, copias, pags, papel, gramagem, flag) VALUES('$cookie- >id_customer','$_POST[file]','$_POST[cor]','$_POST[copias]','$_POST[pags]','$_POST[papel]','$_POST[gramagem]', 0)";
if (!mysql_query($sql,$con))
{
die('Error: ' . mysql_error());
}
echo "Enviado com sucesso!";
mysql_close($con); */
?>