How do I stop the user from entering this php file manually, and accidentally adding a blank id to the array?
<?php
session_start();
$array = ( isset($_SESSION['ids']) && is_array($_SESSION['ids']) ) ? $_SESSION['ids'] : array();
if (!in_array($_GET['id'], $array))
{
$array[] = $_GET['id'];
}
else
{
echo "ID Exists";
}
$_SESSION['ids'] = $array;
print_r($array);
?>