SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Stop members from signinup once 2000 is reached
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

BigBear
Starting Member

3 Posts

Posted - 05/25/2011 :  00:38:46  Show Profile  Reply with Quote
I m trying to disable and redirect to a url that states no more memberships are allowed once 2000 members is reached. Im really lost .

jackv
Flowing Fount of Yak Knowledge

United Kingdom
2033 Posts

Posted - 05/25/2011 :  01:41:41  Show Profile  Visit jackv's Homepage  Reply with Quote
could you post some more details?
Is this at the application level?

Jack Vamvas
--------------------
http://www.sqlserver-dba.com
Go to Top of Page

BigBear
Starting Member

3 Posts

Posted - 05/25/2011 :  11:40:28  Show Profile  Reply with Quote
I have a site that lets members sign-up and there info is stored in a db. The user_id starts at 1 and is incrimented by 1 every time a user signs up. For example first person to sign up is assigned user_id = 1 and the second member to sign up is assigned user_id = 2 ..... and so on. I want to redirect people to a diffrent url once user_id = 2000. The new url will state no new members can sign up.

Thank You
Go to Top of Page

jackv
Flowing Fount of Yak Knowledge

United Kingdom
2033 Posts

Posted - 05/25/2011 :  14:36:42  Show Profile  Visit jackv's Homepage  Reply with Quote
Before your web server writes out to the page - do a call to the database , check the value - and then do a url redirect . Or alternatively , issue a different message to the users.
What application environment are you using

Jack Vamvas
--------------------
http://www.sqlserver-dba.com
Go to Top of Page

BigBear
Starting Member

3 Posts

Posted - 05/25/2011 :  15:49:20  Show Profile  Reply with Quote
Ok im kinda new to this but for example this is som php that checks if there affiliate id is in the url Than changes a forms css. I didnt include the css changes . whould I do somthing similar? So i need to check if user_Id<2000 if not redirect url. How would I do that? Im usuing dream weaver and phpmyadmin.

<?php if ($_SERVER['QUERY_STRING'] != "" && empty($_GET) && !isset($_COOKIE['affiliate_referer_id'])) { setcookie('affiliate_referer_id',substr($_SERVER['QUERY_STRING'], 1),0,'/'); header( 'refresh: 0; url='.substr($_SERVER['REQUEST_URI'],0,-8) );
} ?>

Go to Top of Page

jackv
Flowing Fount of Yak Knowledge

United Kingdom
2033 Posts

Posted - 05/26/2011 :  01:06:34  Show Profile  Visit jackv's Homepage  Reply with Quote
I'd recommend you post this on a PHP thread. The basic principle would be to connect to the database - grab the value - place in a variable - and create the logic to redirect.

Jack Vamvas
--------------------
http://www.sqlserver-dba.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.09 seconds. Powered By: Snitz Forums 2000