Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2004
    Location
    Toronto
    Posts
    3

    Unanswered: is any code that display error message when enter miss value in the field use Perl

    Thankz you very much for helping

  2. #2
    Join Date
    Jan 2004
    Location
    Germany
    Posts
    167
    you can display all error messages thrown by DBMS:
    Code:
    use DBI;
    my $user = 'your_username';
    my $password = 'your_password';
    my $dbms = 'mysql';
    my $host = 'localhost'
    my $database = 'your_database';
    my $driver = "DBI:$dbms:$database:$host";
    
    # prints error message if connection failed
    my $dbh = DBI->connect($driver,$user,$password) or print $DBI::errstr; 
    # prints error message if insert failed
    $dbh->do("INSERT INTO table(col1, col2, col3) VALUES ('Value1','Value2';") or print $DBI::errstr; 
    $dbh->disconnect() or print $DBI::errstr;
    board.perl-community.de - The German Perl-Community

  3. #3
    Join Date
    Feb 2004
    Location
    Toronto
    Posts
    3

    thanz

    i can't use dbi ..the only thing that i only can use perl script in my assignment ...

    i mean when i created a form as register part right??There were so many fields to sign in ...if one of the field is not input value after clicking submit button..the error message gonna show up as "You have to fill out ...."....


    Get it...hopefully you can help me to check it out ..thankz

    have a nice day

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •