Jump to content

Archived

This topic is now archived and is closed to further replies.

NorthWind

textbox array problem

Recommended Posts

[code]
$num=0;
                while ($row = @mssql_fetch_array($result3))
                    {
                    $num++;
                                                                                $itemCode=$row["itemCode"];
                                                                                $description_query = "SELECT * FROM Inventory where itemCode = '$itemCode'";
                    $description_result = mssql_query($description_query, $link);
                    $description_row = @mssql_fetch_array($description_result);
                    $description=$description_row["description"];
$serial=$row["serial"];
echo "<tr align='left'>";
echo"            <td><input name='no[]' type='text' id='no1' size='3' value=$num></td>";
                    echo"            <td><input name='description[]' type='text' id='description' size='70' value=$description></td>";
                    echo"            <td><input name='serial[]' type='text' id='serial' value=$serial></td>";
[/code]

ok this is my code. the problem is, im pulling stuff off the db and listing them 1 by 1 in text boxes. so i used txtbox arrays. the problem is when i try to pull and list data which has two or more words in it (like field name has John Doe), the code just shows John. The array doesnt get the whole thing.
Is there a way to make the array show all? Thanks

Share this post


Link to post
Share on other sites
try

value="$num"

instead of

value=$num

in textbox tag

similarly for all textboxes...

hth

Share this post


Link to post
Share on other sites
thank u Samuel it worked like magic ;)

[!--quoteo(post=374580:date=May 17 2006, 02:56 PM:name=samshel)--][div class=\'quotetop\']QUOTE(samshel @ May 17 2006, 02:56 PM) [snapback]374580[/snapback][/div][div class=\'quotemain\'][!--quotec--]
try

value="$num"

instead of

value=$num

in textbox tag

similarly for all textboxes...

hth
[/quote]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.