strlen($_POST["link"]) > 5 ? $link = $_POST["link"] : $errormsg .= "Please enter a link for the article.<br />";
strlen($_POST["img_link"]) > 5 ? $img_link = $_POST["img_link"] : $errormsg .= "Please enter a image link for the article.<br />";
echo $errormsg;
无论输入是什么,错误消息始终为空。