On Saturday 02 June 2001 10:42, Mark Rowlands wrote:
> I'm using DBI and CGI and mysql on apache (freebsd)
>
> I query a table to produce a table rows looking like this
> the idea being that if you hit the check box, we delete the record
> and if you edit the text field we update the record
>
>
>
> <TR>
> <TD valign=top colspan=2  ><input type="checkbox" name=kista_131
> value=OFF>dpapache : kista_131</TD valign=top colspan=2  >
> <TD><input type="text" name=DG2 size="35" value="blob1"></TD>
> </TR>
>
> <TR>
> <TD valign=top colspan=2  ><input type="checkbox" name=kista_132
> value=OFF>dpapache : kista_132</TD valign=top colspan=2  >
> <TD><input type="text" name=DG3 size="35" value="bezzle"></TD>
> </TR>
> </TABLE>
> <input type="submit" value="Submit" name="edt_table">
> <input type="reset" value="Reset" name="reset">
>
> When I hit submit however, all of the "DGn"  values are submitted changed
> or not.  Can someone point me towards how I should be doing this?...cause
> this obviously aint the right way :-). 

In the absence of any "OH NO, you shouldn't do it like that" type replies.

I have amended it to print a blank text field with the current description 
next to it. So that way a value is only passed when something is entered into 
the field....seems clunky though.

<TR>
<TD valign=top colspan=2  ><input type="checkbox" name=kista_130 
value=OFF>&nbsp;dpapache : kista_130</TD valign=top colspan=2  >
<TD align=left>dpapache01.spray.net</td><td> &nbsp;  <input type="text" 
name=kista_130 size="35"></TD align=left>
</TR>

Reply via email to