The code above produces the result above.Code:code $query="SELECT say FROM test WHERE n = 1 " ; $sql = mysql_query($query); $row = mysql_fetch_assoc($sql); $say= $row['say']; echo $say; result He said "I can't".
Following is some trials for putting the variable "$say" above into a form input tag, but all trials are failed.
Code:trial code1 $inputSay='<input value="'.$say.'">'; echo $inputSay; trial result1 he saidCode:trial code2 $inputSay="<input value='".$say."'>"; echo $inputSay; trial result2 he said "I canHow can I get the following target result exactly in an input tag.Code:trial code3 $say=mysql_real_escape_string($say); $inputSay="<input value='".$say."'>"; echo $inputSay; trial result3 he said "\"I can\
Code:target result he said "I can't".



Reply With Quote


Bookmarks