Passing a variable value from WordPress pages to an external cgi application
-
Let me start by saying the following: I am NOT a php programmer. However, I do write applications in other languages, and have created several websites using WordPress so am pretty familiar with that. I also understand programming principals, logic etc. So please, don’t be gentle.
I have a web application written in Cobol (yes, Cobol) that works with a home-grown CGI wrapper. The app is an on-line order system. We took the front end, up to actually ordering something, and put it into WordPress to be used as a content management system. The WordPress pages consist only of images, text, and links behind the images to the next level of page display. This all works appropriately.
I have figured out how to send an ‘order number’ from the Cobol/CGI app to WordPress – and have WordPress retain that value by passing from page to page via defining my own variable so that when WordPress queries the variables, it is brought into the page. It’s then output as a hidden variable to the next page, and the loop continues. This is now working very nicely.
My problem is, I have to be able to pass that ‘order number’ from any of the WordPress pages back to the Cobol/CGI app. The Cobol app currently works based on a get method (first time into a page), then post for whatever action is taken on that page.
Because the link to the Cobol app is behind the image on the WordPress page, as in
<a href="https://aamorders.curreyadkins.com/aam1000.cgi?PAGE=3"></a>
I need to either a) append an order number, as ina href="https://aamorders.curreyadkins.com/aam1000.cgi?PAGE=3&ORDER={some variable value}"></a>
so the CGI will GET the value,
OR, somehow, link back to the appropriate page (PAGE=3) and pass the order (some variable value).Maybe what I’m asking, is, is there a way to build a link on the fly and have it applied to a specific image on a WordPress page??
Would it be easier to POST the page and order number on the WordPress page and have the CGI execute based on a POST?
Please don’t hesitate to ask questions. This is very perplexing for the php noob ??
- The topic ‘Passing a variable value from WordPress pages to an external cgi application’ is closed to new replies.