Skip to content
Advertisement

how to add underline below php value

Hello guys I am trying add a long line below my

<?php echo '$word'; ?> 

and I am only getting a underlined word. What I want to get is like this:

Name of the Owner: SAMPLE NAME HERE                     Birthdate:
                  _____________________________________           ____________

Just like that and here my current code:

<input type="text" class="form-control input-sm" name="name" placeholder="" size="10" style='margin-right:.3em; border: none; border-color: transparent; pointer-events:none;text-decoration: underline;' value="<?php echo $fullname; ?>">

NOTE: Please don’t mind the in-line CSS. Thanks guys!

Advertisement

Answer

PHP does not support underline in string values. You can use CSS. Eg below:

input {
  height:20px;
  border: none;
  box-shadow: -2px 5px 0px -2px grey, 2px 5px 0px -2px grey;
}
input:focus {
  outline: none;
}
<input type="text" value=""/>
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement