W
W
WoYL2020-07-08 16:02:30
PHP
WoYL, 2020-07-08 16:02:30

How to get a variable through a PHP request?

I'm trying to get the fields through a request of the following format:

$sql_result = $db->query( "SELECT * FROM users WHERE name = '{$user}'" );

then set to DLE variable
$tpl->set( '{armor}', "{THEME}/ArmorAvatar/" . $row['CAid'] . ".png");

But I don’t get anything in response (an empty variable) I tried with other fields, it works adequately, for some reason it doesn’t want to with mine. With what can be connected?
<img src="/templates/s1/ArmorAvatar/.png">

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
v3shin, 2020-07-08
@WoYL

1. Such a column may not exist in the table.
2. The column can be filtered by the model or some other functionality.
What does var_dump($row) say?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question