I'm having a problem with a HTML form and php.
I'm trying to make the default-value of a form-text field to be a pre-defined string. For this I'm using a reference. However, whenever I try to place a string into the form using PHP or references in any kind shape or form, only the first word gets added.
Here is a picture to describe the situation:
Does anyone know why this is happening, and/or a way to work around this issue?
Actual code:
<?php
Echo "<input type="text" name="Address" value="one two three"><br>";
?>
<?php
$str ="one two three";
Echo "<input type="text" name="Address" value=" . $str . "><br>";
?>
<input type="text" name="Address" value=<?php echo "one two three";?>><br>
<input type="text" name="Address" value=<?php $str = "one two three"; echo $str;?>><br>
<input type="text" name="Address" value="one two three"><br>
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…