PDA

View Full Version : loading .txt variable and modify it from cgi


Zorich
08-03-2001, 08:21 PM
Hi all,

I'm wondering if anyone could help me with my problem

I want to load a variable from a text file into a cgi script
Then in the cgi script I want to increase the variable value by 1. Then write it back into the text file.

I have no idea how to do this; my knowledge of cgi is minimum. All I know is I can either read the text file or write into the text file, I don't know how to do both.

Example of the variable I use in the test file:
temp=5

I would appreciate any help, thx.

Jesse
08-04-2001, 02:24 AM
If you want to use PHP this is exactly what my PHP Counter tutorial does.

Zorich
08-04-2001, 03:37 PM
Thx Jesse, I'll give it a shot.

But does PHP works on a server that support cgi? I'm using a free domain that support cgi hehehe.

I'll try it first, thx 8)

Zorich
08-04-2001, 04:19 PM
Unfortunatelly the server doesn't support php 8(
So it didn't work

Any more suggestions? Thx in advance

Jesse
08-05-2001, 02:23 AM
well taht tutorial and the loadVariables tutorial give examples of how you would do it... but I dunno where you'd get the script from... try a CGI site :)

Zorich
08-06-2001, 03:24 AM
Okay, thx anyway, I'll try figure it out somehow hehehe...

Nice site BTW; I'll put the link to this site in my webpage when it's done 8)

Jesse
08-06-2001, 05:21 AM
thanks :)