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!

limit number of visitors on the page ?

Status
Not open for further replies.

Keendev

Technical User
Jan 23, 2006
106
PH
Hi guys,

Happy Holidays to all!!

Just wondering if this is possible ....

1.On the website, they need to login,
2. after the succesful log-in then a session is created...on one of my page I will limit the number who can access the page ?
- Example, on upload pic page (upload.cfm) only one(1) visitor can access it, and one at a time, if the second visitor access it then visitor #2 can see a meesage "please wait for moment while someone is still accessing the page" message.If visitor one leaves the page then page will be open again.

Let me know if this is possible ? Im thinking by checking it using session vars, if more than one session on the upload.cfm page.

Pls advise, if there is more easier way to do it.(i do not have enough time)

Thanks.
 
I don't think a session variable will cover it. Try something like this in your application.cfm file

<cfparam name="application.onUpload" ...>
<cfif application.onUpload eq 1 and cgi.script_name eq "pagename.cfm">
<cflocation ....>
</cfif>

Depending on your upload script, set the application variable to 0 when its done.

Hope this helps.

Al Ridley
Lucid Technologies
 
wow, what a weird requirement

could i ask why you want to limit access to one visitor at a time?

i've never heard of anything like this before

r937.com | rudy.ca
 

Hi again folks.

First, thanks to alucidweb, I'll try your advise and let you know if it work for my page. =) many thanks.

And to r937, yup good thing you ask,maybe you can help me with this too. On my page upload.cfm, there are admin users that will be uploading .csv files. There will be many users uploading files and each .csv files will be thousands of records, those records will be save into a temp table and updates the original table. What i dont like to happen is to mess their datas, if two or three users upload a file at the same time then I think web server will suffer processing those request and may terminate web application.And worst thing is it might mess the data inserting.
Hope its clear.

Maybe you guys have a better idea, hope you can share it to all.

And Seasons greetings to all!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top