Php Help

Hi im making an image upload site but cant get my page to display errors when the user does something wrong can someone help me please

[php]<?php
include ‘init.php’;

if(!logged_in())
{
header(‘Location: index.php’);
exit();
}

//check get var set
//check if album belongs to user

include ‘template/header.php’;
?>

Edit Album

<?php $album_id=$_GET['album_id']; $album_data = album_data($album_id, 'name', 'description'); if (isset($_POST['album_name'], $_POST['album_description'])) { $album_name = $_POST['album_name']; $album_description = $_POST['album_description']; $errors = array(); if(empty($album_name) || empty($album_description)) { $errors[] = 'Album name and description required'; } else { if(strlen($album_name) > 55 || strlen($album_description) > 255) { $errors[] = 'Album name must be less than 55 characters and description must be less than 255 characters.'; } } if(!empty($error)) { foreach ($errors as $error){ echo $error, '
'; } } else { echo 'Edit'; } } ?>

Name:

Description:
<?php echo $album_data['description']; ?>

<?php include 'template/footer.php'; ?>[/php]
Sponsor our Newsletter | Privacy Policy | Terms of Service