It looks like your cookies will only be set if you have the check box checked.
I would change your cookies check to:
<?php
if ((((isset($_POST["mem_mail"]))?$_POST["mem_mail"]:"") != "")) {
setcookie("uname", "".((isset($_POST["mem_mail"]))?$_POST["mem_mail"]:"") ."", time()+(60*60*24*30), "/", "", 0);
}?>
<?php
if ((((isset($_POST["mem_pwd"]))?$_POST["mem_pwd"]:"") != "")) {
setcookie("password", "".((isset($_POST["mem_pwd"]))?$_POST["mem_pwd"]:"") ."", time()+(60*60*24*30), "/", "", 0);
}?>