Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Fortran 95 and HTML form

Status
Not open for further replies.

260791

MIS
Jun 14, 2010
16
GB
I've got a Fortran 95 program (which basically does few calculations) and I'd like to use it online. So that, the users will input data into a HTML form, the program will run, and it will display the results.

Would it be possible to do it in the following way?
To run a little program (e.g. PHP) once the user submits the form, then that program would take the input values from the form and write them into a text file.
Then it runs the Fortran program, which reads the input values from the text file and does all the calculations - outputting the results to another text file (and then back to the website).

If that's possible, how do I put all these steps into one thing, so that they'll be executed one after another?


Thank you very much for your help!
 
I am not exactly what you would call a master of php, but I'd say this is possible. Yes. You can kill a fly by firing at it with a gun.

Look, Fortran is a fairly old thing, maybe older than your parents. Now it is still around for it has a certain quality to crunch big numbers of data. Very big.

But for doing the job you have in mind, I'd say there are more modern things available, that somehow match better with all the internet-things, Java or even newer languages.

Think about it.
Think what happens, when your prog increases in size.

Norbert


The optimist believes we live in the best of all possible worlds - the pessimist fears this might be true.
 
Hey, thank you for you reply.
I understand that Fortran is a very old language and nobody wants to use it these days, but I've already decided to use it a year ago and I've written a program in Fortran so this is not a decision for me anymore.

The program is done. It's there. And I'd like it to co-operate with a HTML form.
Could you please suggest me a way in which it could be done?


Thank you :)
 
If you have a Fortran executable that performs like you want it to, the obvious thing would be to refer to a forum that specialises in html or php coding.
We are specialists in Fortran here, but this is not your problem.

Mikrom and xwb do a know a lot lot in other PLs too, but still....
Sorry, I cannot provide more support to you.

Norbert


The optimist believes we live in the best of all possible worlds - the pessimist fears this might be true.
 
Are you planning to do this on Windows or Linux? Which compiler (gfortran, Intel, absoft, silverfrost) are you using? Some versions have access to a socket library, which is basically all you need to talk to an html page.
 
Thank you for your replies.

I am doing it on Windows server, using a Silverfrost compiler.

The reason I wrote in "Fortran" thread is that maybe there exists possibility for my program to communicate with HTML form (without using any other language in between).

Thanks
 
Silverfrost doesn't have a socket library but it has a sort of pseudo language which will generate a GDI form. Have a look in the helptext for ClearWin+. Most of it is basically how windows was programmed before .net framework came along.

Under ClearWin+, there is a topic called Hypertext windows. This may be what you're looking for. I've never tried it so I don't really know how well it works. There are only 3 pages of documentation for this feature in the express version. May be more in the full blown version.

Have a go and let us know what you think.
 
I have no experience with this, but for communicating with HTML form you could use for example CGI - see this article:
Do you need that your application should be called from a Web Paga on the web, or you only need graphic interface to call your application locally?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top