create 3 arrays. first array last names, second name first name and third array has asked for the wisdom of the Perl Monks concerning the following question:
also if you have suggestions as to how I can clean or speed this up it will be appreciated :)foreach( $msg_num = $msg_count -1; $msg_num >= 0; $msg_num--){ foreach( $i = 0; $i < @messages; $i++){ $sth = $dbh->prepare("select $messages[$i] from messages limit $ +msg_num, 1"); $sth->execute; $messageval[$i] = $sth->fetchrow_array; $sth->finish; }; $from = $messageval[0]; $date = $messageval[1]; $subject = $messageval[2]; $message = $messageval[3]; $msg_id = $messageval[4]; $message =~s/(\r\n|\n\r|\r)/<BR>\n/g; $message =~s/\n{3,}/\n\n/g; print "<TR><TD>\n"; print "Date: $date<BR>\nFrom: $from<BR>\nSubject: $subject<BR>\nMes +sage:<BR>\n$message<BR>\n"; print "<FORM METHOD='POST' ACTION='mb_post.pl'>\n"; print "<INPUT TYPE='HIDDEN' NAME='MSG_ID' VALUE='$msg_id'>\n"; print "<INPUT TYPE='HIDDEN' NAME='FROM' VALUE='$from'>\n"; print "<INPUT TYPE='HIDDEN' NAME='DATE' VALUE='$date'>\n"; print "<INPUT TYPE='HIDDEN' NAME='SUBJECT' VALUE='$subject'>\n"; $message = $messageval[3]; $message =~s/(\r\n|\n\r|\r)/\n/g; print "<INPUT TYPE='HIDDEN' NAME='MESSAGE' VALUE='$message'>\n"; print "<INPUT TYPE='SUBMIT' NAME='REPLY' VALUE='Reply'>\n</FORM>"; print "</TD></TR>\n"; };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: textareas, form scripts, line breaks etc
by arturo (Vicar) on Mar 02, 2001 at 21:26 UTC | |
by create 3 arrays. first array last names, second name first name and third array (Initiate) on Mar 02, 2001 at 21:38 UTC | |
by Boldra (Curate) on Mar 02, 2001 at 22:16 UTC | |
|
(tye)Re: textareas, form scripts, line breaks etc
by tye (Sage) on Mar 02, 2001 at 21:56 UTC | |
by create 3 arrays. first array last names, second name first name and third array (Initiate) on Mar 02, 2001 at 22:16 UTC | |
by tye (Sage) on Mar 02, 2001 at 22:20 UTC | |
by create 3 arrays. first array last names, second name first name and third array (Initiate) on Mar 02, 2001 at 22:31 UTC |