Answer the question
In order to leave comments, you need to log in
How to pull the desired row from the database?
Here is the code:
<div class="form-group">
<label for="game" class="col-sm-3 control-label">Игра:</label>
<div class="col-sm-4">
<select class="form-control" id="gameid" name="gameid" onChange="updateForm()">
<?php foreach($games as $item): ?>
<option value="<?php echo $item['game_id'] ?>"><?php echo $item['game_name'] ?></option>
<?php endforeach; ?>
</select>
</div>
</div>
Answer the question
In order to leave comments, you need to log in
something like this
<div class="form-group">
<label for="game" class="col-sm-3 control-label">Игра:</label>
<div class="col-sm-4">
<select class="form-control" id="gameid" name="gameid" onChange="updateForm()">
<?php foreach($games as $item):
if($item['game_id'] ==1){?>
<option value="<?=$item['game_id'] ?>"><?= $item['game_name'] ?></option>
<?} endforeach; ?>
</select>
</div>
</div>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question