Include statements

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • The Voivod

    Include statements

    I am currently using a perl script to process form data. I don't want
    to lose the functionality I have with this script but need to output
    the data to a mysql db. Someone mentioned that I should use includes
    to process the form with a php script. Can one form be processed by
    two scripts at the same time. If so is this a bad idea? It sounds like
    it would solve my problem if it would work. The problem is that I have
    done nothing more than setup a fre script that requires no coding. I
    don't even know how to implement an include statement.
  • Ondrej Brablc

    #2
    Re: Include statements

    The Voivod wrote:
    [color=blue]
    > I am currently using a perl script to process form data. I don't want
    > to lose the functionality I have with this script but need to output
    > the data to a mysql db. Someone mentioned that I should use includes
    > to process the form with a php script. Can one form be processed by
    > two scripts at the same time. If so is this a bad idea? It sounds like
    > it would solve my problem if it would work. The problem is that I have
    > done nothing more than setup a fre script that requires no coding. I
    > don't even know how to implement an include statement.[/color]

    Don't let confuse yourself, if you have Perl and MySQL, you do not need
    anything else:

    use DBI;

    $::db_host = 'localhost';
    $::db_name = 'dbname';
    $::db_user = 'root';

    $::db = DBI->connect(
    "DBI:mysql:host =$::db_host;dat abase=$::db_nam e",
    $::db_user) || die $DBI::errstr;


    my $stm= $::db->prepare("SELEC T * FROM category ORDER BY category_id");
    $stm->execute || die $::db->errstr;
    my $LST = $stm->fetchall_hashr ef('category_id ');


    Regards,
    Ondrej Brablc

    Comment

    Working...