Re: Passing variables in a multiple part form
| From: | jeremy brand | Date: | Wed, 03 Jan 2001 00:55:56 +0000 |
| Subject: | Re: Passing variables in a multiple part form | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-32429@lists.php.net to get a copy of this message | ||
You might be able to utilize my libHtmlForm package. It is a simple
collection of HTML <form> widgets, but allow for such input as arrays
and defining default values. Very usefull for creating dynamic <form>
elements.
http://www.nirvani.net/software/
Jeremy
Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: jeremy@nirvani.net
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html
for more
Get your own Free, Private email at http://www.smackdown.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"<body>" -- Quoted from Yahoo! homepage, http://www.yahoo.com
On Tue, 2 Jan 2001, Richard J. Mackey wrote:
> Date: Tue, 2 Jan 2001 19:29:36 -0500
> From: Richard J. Mackey <mackeyrj@nettaxi.com>
> To: PHP List Serve <php-general@lists.php.net>
> Subject: [PHP] Passing variables in a multiple part form
>
> I am using PHP3.016
>
> I would like help in setting up the ability to pass a variable from one form into the second
> part of the same form and then again to a third and perhaps 4th part of the same form. Basically I
> have a rough setup on mysite at
> http://mackey-decorating.com/CSForm_start.php3
>
> The first part works fine as does the second part. However after that the variables that are
> created during the loop which makes the table and inserts the textareas for data collection are lost
> when the function ends. The third part of this form works only because I wrote the code for each
> individual table cell. Very time consuming and inefficient.
>
> (Sample)
> $y=1;
> Print " <table border=\"2\" cellpadding=\"3\"
> cellspacing=\"1\">\n";
> Print " <tr>\n";
> Print " <td width=\"100\">\n";
> if ($y<$roomcount)
> {
> print " $Room1\n";
> Print " </td>\n";
> Print "<td width=\"100\">\n";
> print "<input type=\"text\" name=\"Room$y\"
> size=\"20\">\n";
> Print "</td>\n";
> Print " <td width=\"100\">\n";
> print "<input type=\"text\" name=\"Room$y\"
> size=\"20\">\n";
> Print "</td>\n";
> Print "<td width=\"100\">\n";
> Print "<input type=\"text\" name=\"Room$y\"
> size=\"20\">\n";
> Print " </td>\n";
> Print " <td width=\"100\">\n";
> print "<input type=\"text\" name=\"Room$y\"
> size=\"20\">\n";
> Print " </td>\n";
> Print "</tr>\n";
> Print " <tr>\n";
> Print " <td width=\"100\">\n";
> }
> $y=$y+1;
> if ($y<$roomcount)
> {
> print" $Room2\n";
> Print " </td>\n";
> Print "<td width=\"100\">\n";
> print "<input type=\"text\" name=\"Room$y\"
> size=\"20\">\n";
> Print "</td>\n";
> Print " <td width=\"100\">\n";
> print "<input type=\"text\" name=\"Room$y\"
> size=\"20\">\n";
> Print "</td>\n";
> Print "<td width=\"100\">\n";
> Print "<input type=\"text\" name=\"Room$y\"
> size=\"20\">\n";
> Print " </td>\n";
> Print " <td width=\"100\">\n";
> print "<input type=\"text\" name=\"Room$y\"
> size=\"20\">\n";
> Print " </td>\n";
> Print "</tr>\n";
> Print " <tr>\n";
> Print " <td width=\"100\">\n";
> }
>
> (End sample)
>
> All help will be appreciated.
>