Answer the question
In order to leave comments, you need to log in
How to output function value with query in MySQL in PHP?
How to output function value with MySQL query in PHP?
-------------------------------------------------- ---
Code itself:
function get_valplusid_all()
{
global $db;
$singles = $db->query("SELECT MAX(id) + 1 FROM singles"); // Пагинация
return $singles;
}
<div class="col-12">
<input type="number" class="form__input" name="idfilm" value="">
</div>
Answer the question
In order to leave comments, you need to log in
If I correctly understood the meaning of the question (how to enter the value of a variable (for example, $var) in the html code above), then.
The file must be php (not html), and in it:
<div class="col-12">
<input type="number" class="form__input" name="idfilm" value="<?=$var?>">
</div>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question