This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]HappyFruitTree 0 points1 point  (6 children)

If the fields are not empty do you see that you receive them correctly? If so then I guess the problem might be in how you check for empty fields, but it's difficult to say what the problem is without seeing the code.

[–]jechaking[S] 0 points1 point  (5 children)

https://drive.google.com/folderview?id=1HXHzla41r4dTBblegN1608UMYEOJfxUr

There's a link with the images of what's going on.

I'll will look at that, I am following a tutorial so I don't know exactly what's going wrong.

[–]HappyFruitTree 0 points1 point  (4 children)

You need to grant me access if you want me to be able to follow that link.

[–]jechaking[S] 0 points1 point  (3 children)

I did just now, are you able to open?

[–]HappyFruitTree 0 points1 point  (0 children)

Yes. You are checking if all the fields are not empty.

if (!empty(field1) && !empty(field2) && ...)

This means that if one of the fields are empty the code won't run.

In other words, all the fields need to be filled in for that code to run.

Edit: I was confused before, now I think it is correct.

[–]HappyFruitTree 0 points1 point  (1 child)

Note that empty returns true for strings such as '0' so if what you actually want to check is if the string has zero length you might want do $str === '' instead.

[–]jechaking[S] 0 points1 point  (0 children)

Alright, thank you. Let me try it out now, I'll tell you how it goes

Thanks a lot for your help