php - How to hide id and display their name's instead? -


here's example

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'] . "-" ."&nbsp". $rows['lastname'] .",". "&nbsp". $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

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -