php - How to hide id and display their name's instead? -
i don't how hide id of running candidates candid
, can't remove in value because handle votes of candidates need or solution. want display names in preview.php , hide id don't know how?
here's code of plsvote.php:
value="<?php echo $rows['candid'] . "-" ." ". $rows['lastname'] .",". " ". $rows['firstname'] ?>"> <?php echo $rows['lastname'] ?>, <?php echo $rows['firstname'] ?> - <?php echo $rows['party_name']?></option>
here's preview.php:
<?php $resultasa = $db->prepare("select * candposition"); $resultasa->execute(); for($i=0; $rowasa = $resultasa->fetch(); $i++){ $exrxrxrx=$rowasa['pos_name']; if ($exrxrxrx!='error') { ?> <h2 class="fs-title"><?php echo $exrxrxrx ?></h2> //this part call value , codes of example image <input type="hidden" value="<?php echo explode("#", $_post[$exrxrxrx])[0] ?>" name="votes[]" /><?php echo explode("#", $_post[$exrxrxrx])[0] ?><br>
you can use data attrbute in html5 store id.
example:
<span data-id="<?= $id?>"><?= $firstname?> <?= $lastname?></span>
Comments
Post a Comment