How do i check in a http post if my submit form is empty? Since im saving it as base64 it wont let me post if the submit form is empty.
如果我的提交表单为空,我如何签入http帖子?由于我将其保存为base64,如果提交表单为空,它不会让我发布。
$http.post('http://localhost/codeigniter/index.php/api/key/profile', {
picture: $scope.file.base64
username: $scope.username
})
1 个解决方案
#1
0
if (isset($_POST["picture"]) && !empty($_POST["picture"]))
{
echo "Yes, picture is set";
}
else
{
echo "N0, picture is not set";
}
#1
0
if (isset($_POST["picture"]) && !empty($_POST["picture"]))
{
echo "Yes, picture is set";
}
else
{
echo "N0, picture is not set";
}