Errors ,errors

i tried to change the name didnt work

Really need a bit more information on how the code stands now, and your definition of “didn’t work”, to be any help. If you’re still using form variables that might not exist without checking whether they exist, then you’ll get undefined index errors when they do not. Changing the names won’t help.

variables checking whether they exist how check .

Well, you already do it in the first line of your posted code.

One way is to use isset() to check, but empty() will check whether the variable exists, and whether it’s empty. So isset() will return true if the variable exists whether it is empty or not, whereas empty() will return true if the variable either does not exist, or does exist and is empty.

1 Like

We need to see the actual form. It seems like you aren’t telling everything like you usually do. That’s why you have all these vague explanations.

I’ve just presumed a language barrier is the reason for the very short comments from the OP.

1 Like
if($images){
    echo "Yes 1";
}
if(!is_null($images)){
    echo "Yes 2";
}

$images = "hello";

if($images){
    echo "Yes 3";
}

I tried this i got yes 3

What about trying the functions I mentioned in post #24?

#24
where is it

1 Like

General note for the forum: If you look in the top right corner of any post, it shows the post number within a thread, as I’ve highlighted here showing your post as number 29.

1 Like

Off Topic:

Post numbers are not shown on mobile, but if you tap on the post indicator at the bottom of the topic (blue box showing, for example 30 / 31), it will open a dialogue with a “jump to” option. Enter the post number you want to find and it will take you straight there.

On desktop, you can open the dialogue by typing # and then enter the desired post number.

1 Like

Hit the timer for the post.

2 Likes

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.