I have come across this before.  Make sure you put "" around the value field 
and then single quotes around the variable, ie.

<td><input type=text value="<?php echo '$tracking_num' ?>">
> </td>
> <td><input type=text value="<?php echo '$id' ?>"> (NOTE: if this is an int 
value, you do not need to use the single quotes around $id)
> </td>
> <td><input type=text value="<?php echo '$name' ?>">
> </td>
> <td><input type=text value="<?php echo '$user' ?>">
> </td>
> </tr>
> <td><input type=text name="comment" value="<?php echo '$comment' ?>">


HTH

MB

Natividad Castro <[EMAIL PROTECTED]> said:

> Hi to all,
> I'm trying to display data in a form, but for some reason I can display the
> entire value of every field that has more than two words in the text box.
> For example, if I want to display the name CASTRO TRUCKING, the text field
> only display the first word CASTRO.
> 
> I tried to use the trim() function, but it didn't work.
> 
> Any idea?
> 
> Thanks in advanced.
> Nato
> 
> here is the code
> 
> <html>
> <body>
> <?php
> include "./connection.php";
> //include "./common_db.inc";
> //$link_id = db_connect('test_bia');
> 
> $result = mysql_query("SELECT * FROM test LIMIT 0, 1");
> 
> //while($query_data = mysql_fetch_array($result)) {
> 
> echo"<form>";
> while($query_data = mysql_fetch_array($result)){
> 
> 
> 
>   $tracking_num = $query_data[0];
> 
>   $id = $query_data[1];
> 
>   $name = $query_data[2];
> 
>   $user = $query_data[3];
> 
>   $comment = $query_data[4];
> }
> ?>
> <table border=1>
> <form name="test" action="test.php" method="post"
> <tr>
> <td><input type=text value=<?php echo $tracking_num ?>>
> </td>
> <td><input type=text value=<?php echo $id ?>>
> </td>
> <td><input type=text value=<?php echo $name ?>>
> </td>
> <td><input type=text value=<?php echo $user ?>>
> </td>
> </tr>
> <td><input type=text name="comment" value=<?php echo $comment ?>>
> <tr>
> <td><br><br>
> <input type=submit value="Send">
> </td></tr>
> </form>
> </td></tr></table>
> </body>
> </html>
> 
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 



-- 




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to