[eluser]blackhalobender[/eluser]
I have this:
Code:
$data = array('error' => $this->upload->display_errors());
in my controller and this in my view ONCE:
Code:
<?php echo ($_SERVER['REQUEST_METHOD'] == 'POST') ? $error : NULL; ?>
<?php
/// Hack Alert - can't get the default error to go away
if ($error == '<p>Unable to find a post variable called userfile.</p>') {
$error = "";
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Post</title>
<link rel="stylesheet" href="/css/type.css" type="text/css" media="screen"/>
<link rel="stylesheet" href="/css/style.css" type="text/css" media="screen"/>
</head>
<body>
<h1>Post New Listing Step 1 of 3: Details</h1>
<?=$this->validation->error_string; ?>
<?=$propertyTypesValidationError; ?>
<?=$error;?>
<!-- Begin Form -->
<?=form_open_multipart("listings/post/$listingType"); ?>
But when I upload something it's prints out the normal error where I have $error below the heading, and also once above everything. Any help?