Can't display proper value in the textbox from database.Displaying only first word.

  • CODE:

echo "<input type=\"text\" name=\"newstitle1\" value=".$row['news_title'].";

There is no problem with the database part.please help.

echo "<input type='text' name='newstitle1' value='".$row['news_title']."' />";

You got your "'s all mangled up. There's no attribute opening to the value, and no closure of the value attribute and the input tag itself, but also you're not actually sealing the echo statement.

Try to use ' and " respectively, not only does it make it easier to see, but also easier to insert data accurately.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.