php in perl language
i have a program written in perl language. i want to add something in that program but i dono perl. can i have php inside perl language?
i have a program written in perl language. i want to add something in that program but i dono perl. can i have php inside perl language?
Wil posted this at 10:14 — 2nd April 2002.
They have: 601 posts
Joined: Nov 2001
No, you can't. Sorry.
What do you need to ammend to your Perl program? Maybe I could help.
joyce posted this at 10:33 — 2nd April 2002.
They have: 164 posts
Joined: Nov 2001
well, wat if i want to add just a link in perl that will link to php page to execute?(update, insert, delete)??
Wil posted this at 10:40 — 2nd April 2002.
They have: 601 posts
Joined: Nov 2001
OK.
Let's take 2 steps backwards here.
First off; can you tell me what you already have? And then tell me what you're trying to achieve? And then you can tell me your level of knowledge in this field.
From the very rought information you've already provided it sounds to me like you're trying to manage some sort of database? Am I right?
- wil
Suzanne posted this at 18:25 — 2nd April 2002.
She has: 5,507 posts
Joined: Feb 2000
While you're answering Wil, who will probably help you immeasurably, you can link to anything within perl -- the query string you'd send to the php page is just text to it if you escape it properly.
Mark Hensler posted this at 20:38 — 2nd April 2002.
He has: 4,048 posts
Joined: Aug 2000
Jumping between languages is messy, and should be avoided. Perl had a DBI you can use.
joyce posted this at 02:22 — 3rd April 2002.
They have: 164 posts
Joined: Nov 2001
actually what i have here is something like a banner program written in perl. i was to add some more features in it. for eg, for admin page, add 2 more fields for them to choose. and for user page, add few more features which will be written in php. (cos i dono perl) i need to create a sign up page for user and then store it in the exsiting db. and also create a few more page, where user can change the settings....and retrieve the data from the existing tables. and from the perl page, i need to create a few links which will linked to php page...
Wil posted this at 08:50 — 3rd April 2002.
They have: 601 posts
Joined: Nov 2001
OK.
So you have an administrative front end writtin in Perl? And you now want to create a user-based system using your knowledge of PHP?
Interesting .
Do you know what kind of database the system uses? Does it use a SQL database of some sort? If so, then it should be preety easy to write a new application that works off the same database.
If it's using flat-file databases, you are going to have a lot more difficulty - but it shouldn't be impossible. If you're going to work with PHP let's hope that the information is stored in a SQL database. PHP is very good with making database routines easier.
Now can you provide a link to the perl page you need ammended? When you say "i was to add some more features in it" do you mean you want to add more options to current select field or do you actually want to create new fields where people can enter information? The second of these options is going to be a little tricky. I will most probably need to see the source code of your code before being to help you.
Hope this helps.
- wil
a_gajic posted this at 12:32 — 3rd April 2002.
They have: 71 posts
Joined: Aug 2001
Couldn't you just use a SSI command to include the perl into one part of the page and then the php into another? Just an idea?
ROB posted this at 16:30 — 3rd April 2002.
They have: 447 posts
Joined: Oct 1999
what you're trying to do is very ugly. you normally don't want to extend an application using a different language, except with something like COM or ActiveX that is designed specifically for that purpose.
Like Wil said, if all you need to do is modify data in a database you can easily write a second application to give you the functionality you desire, like the admin control panel, but you're gonna have alot of trouble if you want to integrate it with the existing scripts.
Im fairly certain SSI will not be parsed if theyre in a dynamic document, for instance if your php or perl script prints out a SSI command it will not be evaluated. I could be wrong, ive never tried it as using perl or php eliminates the need for SSI, but even if it did work it would be extremely sloppy and you may qualify for a most rigged scripts award.
i'd suggest you either learn Perl (it's very similar to PHP) or find a similar program written in PHP.
Cheers
joyce posted this at 09:33 — 8th April 2002.
They have: 164 posts
Joined: Nov 2001
well, in perl i have this links:
<a href="$cgi_bin_url/adcenter.cgi?task=edit_adtype&tid=$tidref[$k]->{TID}&cache=$cache">Edit</a> |
<a href="$cgi_bin_url/adcenter.cgi?task=view_adtype_history&tid=$tidref[$k]->{TID}&cache=$cache">Stats</a>
now i want to add one more link "Price" which will link to my php page. how can i do that??
Wil posted this at 10:31 — 8th April 2002.
They have: 601 posts
Joined: Nov 2001
You'd just add an extra . I think that's more of a HTML output question than a Perl one?
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.