Re: [Nolug] php help: storing from variable # of form entries

From: Christopher M. Jones <cjones12_at_tulane.edu>
Date: Thu, 28 Aug 2003 18:25:39 -0500
Message-ID: <20030828232539.GC838@copernicus.tulane.edu>

Thanks, everybody, for your suggestions. Unfortunately, I am too thick
to put all the pieces together. I think I understand the examples, but
I still can't seem to get things to work. Here is some sample code so
everyone can see exactly what it is I am trying to accomplish.
<html>
<body>

<form action="<?echo $PHP_SELF?>" method="post">

<?php

if($submit){
        /* Get the data in forms (named data_0, data_1, and data_2)
and
                do something with it This is where I am lost.*/
}

$row[0] = data0;
$row[1] = data1;
$row[2] = data2;

/* The number of assignments here is variable, taken from however many
records may be present in a given table. The program loops through all
the information, creating an input for each one. These have to be
stored in a database. */

for ($i=0; $i < 3; $i++){
        echo $row[$i];
        echo "<input type=text name=data_$i size=3></br>";
}

?>
<input type=submit name=submit>
</form>
___________________
Nolug mailing list
nolug@nolug.org
Received on 08/28/03

This archive was generated by hypermail 2.2.0 : 12/19/08 EST