Ads Posted May 24, 2010 Share Posted May 24, 2010 I am Pulling the name of an item from the Database into a Text Field, However if the name from the Database is more than one word it only Displays the First word and Curts off the Rest of the words. Do i need to add a PHP Command to tell it to not do this? Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted May 24, 2010 Share Posted May 24, 2010 Code? Quote Link to comment Share on other sites More sharing options...
Ads Posted May 24, 2010 Author Share Posted May 24, 2010 Ah Sorry. $id = $_REQUEST['id']; $db = mysql_query("SELECT * from weps where id=$id"); $a=mysql_fetch_array($db); Name: <input type='text' name='name' value=$a[name]> Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted May 24, 2010 Share Posted May 24, 2010 You need to enclose the value in quotes: <?php echo 'Name: <input type="text" name="name" value="' . htmlenitites($a['name'],ENT_QUOTES) . '">'; >?> Ken Quote Link to comment Share on other sites More sharing options...
Ads Posted May 24, 2010 Author Share Posted May 24, 2010 Working, Thank you Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.