develooper Front page | perl.beginners | Postings from February 2002

Re: php and perl

Thread Previous | Thread Next
From:
dhoubrechts
Date:
February 25, 2002 12:40
Subject:
Re: php and perl
Message ID:
3C7AA102.29D62E80@cybernet.be
sachin balsekar a écrit :
> 
> hi joyce,
> 
> i would suggest you use PHP for the same...even client side validation
> using javascript could help...but if you need to compare with
> databases..you cud use php itself and pass the parameters to the same
> page ($PHP_SELF) and get things working...
> also if you wish to stick to PERL...what you cud do is call perl script
> (with data as command line parameters) in PHP using exec command in
> which you have an option of not only calling a script...but also
> fetching the output of the program..
> to choose the best option is upto you so its you to decide :-)
> 
> hope this helps...
> 
> regs,
> Sachin Balsekar..
> 
> /**
> There's always more than one way to do something..
> **/
> 
> Joyce Harris wrote:
> 
> > I have a php form and I need to do some data validation either before
> > inserting data into the database or comparing data in a textfield to
> > data in the database. It seems like the easiest way to do this is
> > using perl. How do you call a perl script from a php script.
> >
> > Thanks,
> > Joyce
> >
> 
> --
> To unsubscribe, e-mail: beginners-unsubscribe@perl.org
> For additional commands, e-mail: beginners-help@perl.org

If you want to call a perl script from a php script use
 
exec("echo $variable | perl_script.pl", $output);

where $variable comes from php to perl_script.pl and $output contains
the variables from the perl script to php 

have a look at $output[0], $output[1], etc...

see manual pages for php fonction exec !

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About