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
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:
There have been <!--#exec cmd="cat /var/local/cvs/teachers.dat"-->
teachers' CVs submitted.
There are lots more elegant ways, though...
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!