2
I’m bringing this mysql database variable for a text input, but the result I’m not showing because of the pelicas.
$cota = '946.9"1968/1975" AMA Ant';
echo '<input type="text" value="'.$cota.'" />';
result: 946.9
2
I’m bringing this mysql database variable for a text input, but the result I’m not showing because of the pelicas.
$cota = '946.9"1968/1975" AMA Ant';
echo '<input type="text" value="'.$cota.'" />';
result: 946.9
3
Do it:
<?php
$cota = '946.9"1968/1975" AMA Ant';
echo "<input type='text' value='" . $cota . "'/>";
2
Basically use htmlentities:
<?php
$cota = '946.9"1968/1975" AMA Ant';
echo '<input type="text" value="'.htmlentities($cota, ENT_QUOTES).'" />';
Reference: htmlentities
This solution also works, thank you.
Browser other questions tagged php mysql input
You are not signed in. Login or sign up in order to post.
I tested it here and it worked perfectly
– Woton Sampaio
Thanks, it works.
– Sergio Teixeira