Gossamer Forum
Home : Products : DBMan : Customization :

Add Time

Quote Reply
Add Time
Hi all,
I have no problem with add time stamp when modify a record, but when I do the if statment it will not work. How do you do statement like:
Code:

sub html_modify_form_record {
# --------------------------------------------------------
# The user has picked a record to modify and it should appear
# filled in here stored in %rec. If we can't find the record,
# the user is sent to modify_failure.

my (%rec) = &get_record($in{'modify'});

if ($rec{'Status'} eq 'Received') {
$rec{'Received Time'} = &get_date;

}
if (!%rec) { &html_modify_failure("unable to find record/no record specified: $in{'modify'}"); return; }

&html_print_headers;
print qq|
<html>
<head>
<title>$html_title: Modify a Record.</title>
</head>

<body bgcolor="white">
<form action="$db_script_url" method="POST">
<input type=hidden name="db" value="$db_setup">
<input type=hidden name="uid" value="$db_uid">
<center>
<table border=1 bgcolor="#FFFFFF" cellpadding=5 cellspacing=3 width=650 align=center valign=top>
<tr><td colspan=2 bgcolor="#0000ff">
<FONT FACE="MS Sans Serif, arial,helvetica" size=2 COLOR="#FFFFFF">
<H1><center> $html_title: Modify a Record </center></H1>
</td></tr>
<tr><td>
<p><center><$font_title><b>
Modify a Record
</b></font></center><br>
<$font>
|; &html_record_form (%rec); print qq|
</font></p>
<p><center> <INPUT TYPE="SUBMIT" NAME="modify_record" VALUE="Modify Record"> <INPUT TYPE="RESET" VALUE="Reset Form"></center></p>
|; &html_footer; print qq|
</td></tr>
</table>
</center>
</form>
</body>
</html>
|;
}

I just want :
If my Status is Recieved then my modify time will be update
but if my Status is NOT Received then leave it blank in my update time.
Anyone have any idea ???

Thanks for your help.