Reply to Multiline data Insert Into table from a generated form?

Your name:

Reply:


Posted by Alp on 02/02/05 13:17

Hi experts,

I'd like your advice on the following as to how to approach/resolve. I'm
generating a form based on a user input number, say 3, where 3 lines for
input for a few fields are created. What would be the appropriate way to
append these 3 seperate lines into the table all at one go? I have tried to
name the input fields per its corresponding line number (not sure yet if it
properly is working though).

I have given the code for the form below. I tried to use a similar approach
for the $sql (whit while) but apparently either the form or the sql is
failing.

Any help, pointers, advice would be highly appreciated. Thanks in advance.

Alp

Code:
print '<table width="545" border="0" cellspacing="0" cellpadding="0"
align="center"><tr>';
print '<form action="test1.php" method="POST">';
$i = 1;
while ($i <= $tour_days) {
print '<input type="hidden" name="tourdays" value="'.$tour_days.'">';
print '<input type="hidden" name="tourid'.$i.'" value="'.$tour_id.'">';
$days = ("Day&nbsp;0".$i);
print $days;
print '<input type="hidden" name="dayno'.$i.'" value="'.$days.'">';
print '</td>';
print '<input type="text" name="fromto'.$i.'" size="50"></td>';
print '<input type="text" name="bld'.$i.'" size="10"></td></tr>';
print '<tr><td colspan="3">';
print '<textarea name="descrip'.$i.'" rows="5" cols="80"
wrap="virtual"></textarea></td></tr>';
$i++;
}
print '</table>';
print "<input type=\"submit\" value=\"submit!\">\n</form>\n";

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация