css - php echo statement div class -
<?php $lname = $_post['lname']; if ( isset($_post['lname'] )&& !empty( $_post['lname'] ) ) { echo '<div class="result"my blank under</div> <div class="green"> $lname </div> '; } else { echo '<div class="result">please tell them your</div> <div class="green">last name!</div> '; } ?>
the syntax should right when come in info form echo statement displays variable name $lname in greenish class not info entered.
did forget quotes somewhere or escape somewhere?
<style> .result { color: #fff; display: block; font-size: 36px; margin-top: 1px; margin-before: 5px; margin-bottom: 0px; margin-start: 0; margin-end: 0; text-align:center; font-weight: bold; } .green { color: #c9ff1f; display: block; font-size: 40px; margin-top: 1px; margin-before: 5px; margin-bottom: 0px; margin-start: 0; margin-end: 0; text-align: center; font-weight: bold; } </style>
user below code, solve problem. <?php $lname = $_post['lname']; if ( isset($_post['lname'] ) && !empty( $_post['lname'] ) ) { echo '<div class="result">my blank under </div> <div class="green"> '.$lname.' </div> '; } else { echo '<div class="result">please tell them your</div> <div class="green">last name!</div> '; } ?>
php css class html echo
No comments:
Post a Comment