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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.