Hi People,
Could someone support me here with this code for a licence system,

<? session_start();
include 'config.php';
$ip = $_SERVER['REMOTE_ADDR']; //get the ip of the current user
if(!isset($_SESSION['session_username']) || empty($_SESSION['session_username']) || $ip!= $_SESSION['session_ip']) {
//if the username is not set or the session username is empty or the ip does not match the session ip log them out
session_unset(); //clears firefox
session_destroy(); //clears IE
die("Please Login To Access The Licence System Admin Area"); } ?>

<?
$suspend = "suspended";
$update = $_POST["licence"];
if($action == "suspend") {
$add = mysql_query("INSERT INTO `slicences` ( `licences`) VALUES ('$update')");
echo "Licence Suspended Succsessfully.";
}else{
?>
<form method="POST" action="suspendlicence.php?action=suspend">
<?
echo "<select size='1' name='licence'>
<option selected>Choose A Licence</option>";
include('config.php');
$result = mysql_query("SELECT * FROM `licence`");
while($worked = mysql_fetch_array($result)) {
$licence = $worked["licence"];
echo "<option value=$licence>$licence</option>";
}
mysql_close(); ?>
<br>
<input type="submit" value="Suspend Licence"></p>
</form>

Can you insert a code to make it say - If that licence already exsists in the suspended table in the database it errors saying "This licence has already been suspended"
Thanks People!