PHP code working on local but not on remote server
553
People are also looking for solutions to the problem: javascript - Can the laravel _token be used to avoid submitting a form twice?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.
Find the answer in similar questions on our website.
Answer
Solution:
I have found the answer.
The empty function only takes a variable and cannot be used like:
empty(cleanData($_POST['fname']))
Using (strlen(cleanData($_POST['fname']))==0) has solved the issue.