multiple row updates in MYSQL using HTML

From: Gary (reachus_at_netlink.info)
Date: 01/16/04


Date: Thu, 15 Jan 2004 19:52:33 -0500

I haver a table of students - Say 100 students that I need to be able to
update/delete and amend. I know I can do this one student at a time which is
simple but lets say I want to see all the students on the screen at the same
time, modify some, mark some for deletion and even have blank fields at the
end to add a new record.

In HTML which is generated I label each row and input field with a
name/number combination i.e <input type=text value=mysqlvalue
name=field$cnt> where the number ($cnt) is incremented each row and then I
pass these fields (all of them) to another routine to actually do the
update.

With 100 Students displayed I need about 500 variables minimum so I can
store all new values entered on any of the 100 students and then pass them
all to another perl script to perform the update.

There must be a better way - Any pointers or examples anywhere would be
excellent.

I basically need maintenance of one table with unlimited rows containing say
5 fields using Perl/HTML and MySQL.

Many thanks
Gary



Relevant Pages

  • Re: [PHP] Encoding issue with ?
    ... The issue is that users can specify text as well as currency in ... the input field ie '£2 students / £5 general admission'. ...
    (php.general)
  • Re: multiple row updates in MYSQL using HTML
    ... Sound like you have right approach. ... The only other thing that I can think of is to add a checkbox next to ... >update/delete and amend. ... >simple but lets say I want to see all the students on the screen at the same ...
    (comp.lang.perl)