General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old April 9th, 2004, 04:16 PM
squirto28 squirto28 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Posts: 2 squirto28 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Displaying dynamic text box input

I name text boxes on one page based on my query from my data base and I name the boxes like this:

PHP Code:
for ($i=0$i<$totalRows_Recordset1$i++)

 
$row_Recordset1 mysql_fetch_array($Recordset1);
 echo 
"<tr>";
 echo 
"<td>";
 echo 
$row_Recordset1[Item_Name];
 echo 
"</td>";
for (
$t=0$t <= 3$t++)

 echo 
"<td>"
 echo 
'<input name ="'.$row_Recordset1[Item_Name].$i.$t.'" type="text" size="7">'
 
value='.$row_Recordset1[Item_Code].'>';
echo "</td>"; 
}

</FONT>

Then I want to post it on the next page.

The code I have is like this:
PHP Code:
for ($i=0$i<$totalRows_Recordset1$i++){ 
 
$row_Recordset1 mysql_fetch_array($Recordset1);
 echo 
"<tr>";
 echo 
"<td>";
 echo 
$row_Recordset1[Item_Name];
 echo 
'<input name ="item_'.$i.'" type="hidden" size="7" value='.$row_Recordset1[Item_Code].'>';
 echo 
"</td>";
 for (
$t=0$t <= 3$t++)
 {
  echo 
"<td>";
  echo 
'<input name ="number_'.$i.$t.'"  value="'.$_POST[$row_Recordset1[Item_Name].$i.$t].'" type="text" size="7" readonly="true">';
  echo 
'<input name ="numberC_'.$i.$t.'" type="hidden" size="7" value='.$row_Recordset1[Item_Code].'>';
  echo 
"</td>";
 }
 echo 
"<td>";
 
$answer = ($_POST[number_.$i.'0'] + $_POST[number_.$i.'1'] - $_POST[number_.$i.'2']) - $_POST[number_.$i.'3'];
 echo (
'<input name="answer'.$i.'" value="'.$answer.'" type="text" readonly="true" size="7">');
 echo 
"</td>";



This is the line that I want to fix:
<FONT color=#007700><FONT face="Courier New"><FONT face=Verdana color=#000000>
PHP Code:
echo '<input name ="number_'.$i.$t.'"  value="'.$_POST[$row_Recordset1[Item_Name].$i.$t].'" type="text" size="7" readonly="true">'



It doesn't display the numbers I entered on the previous page.

Any ideas???
URL

Thanks

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > Displaying dynamic text box input


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT