<input name="name" type="text"
id="nome" size="45" maxlength="35" value=<?php echo "need help" ?>/>
// output "need" but i expect "need help"
it was a POST var string of a name, but just out puts the fist name, then i realised the echo or print do not work with whitespace inside the tag value, like echo do outside
what the solution to "need help"??
Currently, your HTML mark up would look like:
<input name="name" type="text"
id="nome" size="45" maxlength="35" value=need help/>
^--------^
As it's evident from the syntax highlighting here, only need
is considered as part of the value
attribute. help
is being considered as a separate new attribute.
You need quotes around the attribute value:
<input name="name" type="text"
id="nome" size="45" maxlength="35" value="<?php echo "need help" ?>"/>
^ ^
try this code.
<input name="name" type="text"
id="nome" size="45" maxlength="35" value="<?php echo 'need help'; ?>"/>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With