About mysqli_ferch_assoc() method
杨先生
杨先生 2018-01-28 11:18:35
0
3
1283


$result=mysqli_query($sql,$con)

if($row=mysqli_fetch_assoc($result){}

Why is the if condition not executed?

杨先生
杨先生

reply all(3)
似火年华

Is that a comma or a comma?

寻觅 beyond

If no error is reported, it means that it has been executed.

You can print the contents of $result. Also,

Are you sure that the two parameters of your mysqli_query are not misplaced? ? ? ? ?

phpcn_u102945

if($row=mysqli_fetch_assoc($result){}

There are missing brackets, you should see the system prompts to find it!

Correct: if($row=mysqli_fetch_assoc($ result)){}

  • reply Hello, I didn’t include the brackets when I wrote the question, but they are there in the code.
    杨先生 author 2018-01-28 17:01:36
  • reply What I am doing is making a judgment in the login verification. He does not make a judgment and just jumps down.
    杨先生 author 2018-01-28 17:02:41
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template