Gossamer Forum
Home : Products : DBMan : Customization :

Userid (Cont.)

Quote Reply
Userid (Cont.)
Ok....making progress. I still have a problem.

Here is a snippet from my html.pl file:


elsif ($rec{'Notes2'} gt $db_defaults{'Notes2'}) {
print qq|

<TR><TD ALIGN="Right" VALIGN="TOP"><$font>Notes:</FONT></TD>
<TD VALIGN="TOP"> <TEXTAREA NAME="Notes1" ROWS="3" COLS="40" WRAP="VIRTUAL" MAXLENGTH="1000">$rec{'Notes1'}</TEXTAREA></TD></TR>

<TR><TD ALIGN="Right" VALIGN="TOP"><$font>Notes:</FONT></TD>
<TD VALIGN="TOP"> <TEXTAREA NAME="Notes2" ROWS="3" COLS="40" WRAP="VIRTUAL" MAXLENGTH="1000">$rec{'Notes2'}</TEXTAREA></TD></TR>
<tr><td align=right valign=top></td>
<td align=right valign=top><font face=arial size=1>Posted By: $rec{'Userid2'}  $rec{'Date2'}</font><p></td></tr>

<TR><TD ALIGN="Right" VALIGN="TOP"><$font>Notes:</FONT></TD>
<TD VALIGN="TOP"> <TEXTAREA NAME="Notes3" ROWS="3" COLS="40" WRAP="VIRTUAL" MAXLENGTH="1000">$rec{'Notes3'}</TEXTAREA></TD></TR>
<input type="hidden" name="Date3" value="|; print &get_date; print qq|">
<input type="hidden" name="Userid3" value="$db_userid">

|;
}


Ok, what that does, is if there is something other than the default blank in "Notes2" it prints that out so the user can fill in the "Notes3" and the program fills out "Date3" and "Userid3". It works fine. The problem lies when the next one in the series is called on.

Here is the next one:


elsif ($rec{'Notes3'} gt $db_defaults{'Notes3'}) {
print qq|

<TR><TD ALIGN="Right" VALIGN="TOP"><$font>Notes:</FONT></TD>
<TD VALIGN="TOP"> <TEXTAREA NAME="Notes1" ROWS="3" COLS="40" WRAP="VIRTUAL" MAXLENGTH="1000">$rec{'Notes1'}</TEXTAREA></TD></TR>

<TR><TD ALIGN="Right" VALIGN="TOP"><$font>Notes:</FONT></TD>
<TD VALIGN="TOP"> <TEXTAREA NAME="Notes2" ROWS="3" COLS="40" WRAP="VIRTUAL" MAXLENGTH="1000">$rec{'Notes2'}</TEXTAREA></TD></TR>
<tr><td align=right valign=top></td>
<td align=right valign=top><font face=arial size=1>Posted By: $rec{'Userid2'}  $rec{'Date2'}</font><p></td></tr>

<TR><TD ALIGN="Right" VALIGN="TOP"><$font>Notes:</FONT></TD>
<TD VALIGN="TOP"> <TEXTAREA NAME="Notes3" ROWS="3" COLS="40" WRAP="VIRTUAL" MAXLENGTH="1000">$rec{'Notes3'}</TEXTAREA></TD></TR>
<tr><td align=right valign=top></td>
<td align=right valign=top><font face=arial size=1>Posted By: $rec{'Userid3'}  $rec{'Date3'}</font><p></td></tr>

<TR><TD ALIGN="Right" VALIGN="TOP"><$font>Notes:</FONT></TD>
<TD VALIGN="TOP"> <TEXTAREA NAME="Notes4" ROWS="3" COLS="40" WRAP="VIRTUAL" MAXLENGTH="1000">$rec{'Notes4'}</TEXTAREA></TD></TR>
<input type="hidden" name="Date4" value="|; print &get_date; print qq|">
<input type="hidden" name="Userid4" value="$db_userid">

|;
} [\red]

As you can see, it has places for the other to be called. This is all in my sub html_record_form BTW. When it writes on the next one, in this case Notes4, the date and userid that are paired with Notes3, get set to default, ie, are now blank and no longer print. I checked the .db file and they are indeed being erased.

The problem may lie with the fact i dont understand what the "gt" does. I tried to look it up but couldnt find anything.

Can anyone help me?

Once I get all this up and running, I am planning on posting it here, but I am still inexpereniced with some Perl and need guidance. thanks.



Quote Reply
Re: Userid (Cont.) In reply to
Please simply add replies to related Threads that you have started.

Regards,

Eliot Lee
Quote Reply
Re: Userid (Cont.) In reply to
gt = greater than

lt = less than
eq = equals
ne = not equal

- Mark


Astro-Boy!!
http://www.zip.com.au/~astroboy/
Quote Reply
Re: Userid (Cont.) In reply to
How can I make it so that the date that a certain field is modified prints out? It keeps deleteing itself.

Quote Reply
Re: Userid (Cont.) In reply to
Nevermind. I got it. Just keep the fields hidden. Thanks for your help.