LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[CLUG] [OT] CGI Help

[CLUG] [OT] CGI Help

Peter Flynn peter at silmaril.ie
Sun Feb 27 19:28:03 GMT 2000


On Sat, 26 Feb 2000, Damien wrote:
>  Example: some mechanic adds his cv in the "Automotive section " 
> and the page then says " There are 9 people who have submitted 
> their c.v.s in the Automotive Section"  

The problem with all these kinds of application is that the frivolous
submissions get auto-counted along with the genuine ones. 

>  I can use some mailform cgi for the CV submission but what do I 
> add into the script to increment some stored variable and then 

Have one file per class of employment, eg /var/local/cvs/teachers.dat
etc.

In the script:
Check no other process (of the script) is using the file (check and write a lock file)
Read the previous value from a file, add 1 to it and write it back to the file.
Process the form.
Remove the lock.

Assuming you are using a Web server like Apache that can do server-side
inclusion: use multiple files, one for each employment class; rename the
HTML files to .shtml and add in the relevant place:

[eg teachers.shtml]
There have been <!--#exec cmd="cat /var/local/cvs/teachers.dat"-->
teachers' CVs submitted.

There are lots more elegant ways, though...
///Peter




More information about the Cork mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell