Hi everyone!

I'm working on a project whereby the system is rule-based. I have to write the rules in either Common Lisp but the problem is that i'm using PHP for designing the interface and I'm not able to link these two languages.

Could anyone plz help me??????

Hi everyone!

I'm working on a project whereby the system is rule-based. I have to write the rules in either Common Lisp but the problem is that i'm using PHP for designing the interface and I'm not able to link these two languages.

Could anyone plz help me??????

What type of system and environment are you working in. Is it web based, desktop?

It's a web based project.

It's a web based project.

Could you explain a bit more about the project. Some sample code you have tried. What do you mean specifically by "link the two languages".

If its web based then you'd be designing the interface with xHTML and CSS, or say XML and XSLT or other variations. You would be generating the xHTML/XML/CSS/XSLT etc. with either PHP or Common Lisp. You can use either PHP or CL or both one after the other. Not at the same time.

Eg:

Have PHP create XML that will then be fed to CL to post-processing.

It's hard to say exactly where you're trying to do so it's even harder to answer your question. I've never worked with CL so not familiar with its implementations. I don't think you need both PHP and CL, maybe just one of them would do?

Hi. I'm working on a Political decision support system whereby I'm using HTML and javascript for interface design and validations plus PHP for connecting to database and other transactions.

I have to define a set of rules based on which decisions will be taken say for e.g

for deciding whether a person is eligible for elections, my system should go through a set of predefined rules in CommonLisp and take decisions. So, my problem is while I'm working on HTML how am I going to call those rules defined in CL.

That is, when I submit an HTML form in PHP, it should go through the set of rules in CL and then give the result in another HTML page.

Sorry, I can't provide you sample code as you said because I still haven't implemented anything in CL as yet as I am getting problems for linking these languages.

Hope you can help me out.

Hi. I'm working on a Political decision support system whereby I'm using HTML and javascript for interface design and validations plus PHP for connecting to database and other transactions.

I have to define a set of rules based on which decisions will be taken say for e.g

for deciding whether a person is eligible for elections, my system should go through a set of predefined rules in CommonLisp and take decisions. So, my problem is while I'm working on HTML how am I going to call those rules defined in CL.

That is, when I submit an HTML form in PHP, it should go through the set of rules in CL and then give the result in another HTML page.

Sorry, I can't provide you sample code as you said because I still haven't implemented anything in CL as yet as I am getting problems for linking these languages.

Hope you can help me out.

Can you invoke Common Lisp from the command line?

If so, and provided you can with your PHP install, you can send a command to Common Lisp from PHP with your parameters and then have PHP handle the response and write this back to HTML.

Look at the exec(), system(), passthru() functions in the PHP docs.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.