Jump to content

textbox array problem


NorthWind

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
Link to comment
https://forums.phpfreaks.com/topic/9835-textbox-array-problem/
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]
Link to comment
https://forums.phpfreaks.com/topic/9835-textbox-array-problem/#findComment-36531
Share on other sites

Archived

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

×
×
  • Create New...

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.