Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I want to update a sql table based on which button was pushed from the corresponding row. Here is my table and sql query.
So when I push the returned button i would like a sql statement to update that row in my sql table. I dont really understand CGI that well and could use some help.$STH10=$DBH->query(' SELECT * FROM equiplog'); print"<table>"; print"<form action='equipmentcalendar.pl' method='post'>"; while (@data = $STH10->fetchrow_array()) { print "<tr>"; print "<td>$_</td>" for @data[1,2,3]; print "<td>"; print '<center>'; print button( -name => 'returned', -value => $data[0], -label => 'returned' ); print '<center>'; print "</td>"; print "</tr>"; } print"</table>";
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Update mysql table with button on corresponding row
by blue_cowdawg (Monsignor) on Feb 11, 2013 at 16:21 UTC | |
by Anonymous Monk on Feb 11, 2013 at 18:20 UTC | |
Re: Update mysql table with button on corresponding row
by igelkott (Priest) on Feb 11, 2013 at 15:19 UTC | |
by Anonymous Monk on Feb 11, 2013 at 15:42 UTC | |
by Anonymous Monk on Feb 11, 2013 at 16:15 UTC |
Back to
Seekers of Perl Wisdom