Well, im developing a CMS based form with a copy-center-system (this is the form), but i need the $cookie->id_customer. But i get an error:
Fatal error: Call to a member function isLogged() on a non-object in /home/papelari/public_html/modules/mymodule/submit.php on line 13
<?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); */
?>