I dont understant why the second value in my button is not completely displayed
<p><input type ="button" id="comment"
value=<?php echo $comment_exist == null ? 'Save' : 'Cancel my comment'; ?>></p>
if condition is true, Save
is displayed if not Cancel
is displayed but not my comment
.
Do you know why ? Thank you for your help
You'l need to quote your values. Either in single quote or double. And always have a practice of closing "self-closing" tags />
<p>
<input type ="button" id="comment"
value="<?php echo $comment_exist == null ? 'Save' : 'Cancel my comment'; ?>" />
</p>
Try this (adding quotes)
<p><input type ="button" id="comment"
value="<?php echo $comment_exist == null ? 'Save' : 'Cancel my comment'; ?>"></p>
Try to quote this php code like this may be it will work
<p><input type ="button" id="comment" value="<?php echo $comment_exist == null ? 'Save' : 'Cancel my comment'; ?>"></p>