Hello,
Cookie does not work in class, where is the problem?
<?php
class Registration {
private $user_name = "";
public function __construct() {
if(!isset($_SESSION))
{
session_start();
}
}
$this->EditRegisterNewUser();
private function registeredUserEditUser() {
setcookie("user_name", $_POST['user_name']);
if (empty($_POST['user_name']) ) {
$this->errors[] = "Kullanıcı adı alanı boş";
}
// elseif and continues...
}
}
@$registration = new Registration();
?>
<form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>" name="registerform" />
<input type="text" name="user_name">
<input type="submit" name="register" value="CREATE ACCOUNT">
</form>