mysql echo does not retreive word after a space in textbox

Mar 12, 2012   //   by   //   Blog, MySQL Tutorial  //  No Comments

I have a textbox which i echo data from mysql. However if there is a space in the mysql database feild it does not show the word after the space.

For example. If there was ‘john Bloggs’ in the database and I echoed it to the text field it would only show ‘john’.

Here’s the code:

<input name="name" type="text" id="name" title="Enter Name" size="23" maxlength="400" value="<?php echo htmlspecialchars($row3['name'])?>">

quotes should around the value of your input.

Leave a comment

Share This Post

RSS Wordpress News