By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,349 Members | 1,353 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,349 IT Pros & Developers. It's quick & easy.

Include statements

P: n/a
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.
Jul 16 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
The Voivod wrote:
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.


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;database=$::db_name ",
$::db_user) || die $DBI::errstr;
my $stm= $::db->prepare("SELECT * FROM category ORDER BY category_id");
$stm->execute || die $::db->errstr;
my $LST = $stm->fetchall_hashref('category_id');
Regards,
Ondrej Brablc

Jul 16 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.