#========== CHECK IF USER EXISTS & OR TRYING TO REGISTER MORE THAN ONC +E ======== local *STDERR = *STDOUT; $! = 0; $select = $db->prepare( "SELECT username, DATE_FORMAT(date, '%d %b, %H +:%i') AS f_date FROM users WHERE username = ?" ); $select->execute( $username ); $row = $select->fetchrow_hashref; die( h1( {class=>'cyan'}, "Μα είσαι + ήδη μέλος $row->{username}! +Πραγματοποί&#9 +51;σες εγγραφή &#96 +3;τις $row->{f_date}." )) if( $select->rows ); $select = $db->prepare( "SELECT username FROM users WHERE host = ?" ); $select->execute( $host ); $row = $select->fetchrow_hashref; die( h1( {class=>'cyan'}, "Κόφτο $row->{usern +ame}! Μην προσπαθ&# +949;ίς να κάνεις &# +960;ολλές εγγρα&#96 +6;ές με διαφορ&#949 +;τικά oνόματα!" )) + if( $select->rows );
I liek the approach you mentioned ikegami, thank you but:

Software error:

Μα είσαι ήδη μέλος marmel13! Πραγματοποίησες εγγραφή στις 25 Apr, 01:16.

at D:\www\cgi-bin\register.pl line 74. For help, please send mail to the webmaster (nikos1337@gmail.com), giving this error message and the time and date of the error. Sat Apr 28 13:05:09 2007 register.pl: Μα είσαι ήδη μέλος marmel13! Πραγματοποίησες εγγραφή στις 25 Apr, 01:16.

Iam getting both the error that i want to print colored which is good but the software error above....

In reply to Re^2: Merge 2 lines in 1 die statement by Nik
in thread Die statement with text & formatting of the user by Nik

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.