Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
BigBear
Starting Member
3 Posts |
Posted - 2011-05-25 : 00:38:46
|
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
Master Smack Fu Yak Hacker
2179 Posts |
Posted - 2011-05-25 : 01:41:41
|
could you post some more details? Is this at the application level?Jack Vamvas--------------------http://www.sqlserver-dba.com |
|
|
BigBear
Starting Member
3 Posts |
Posted - 2011-05-25 : 11:40:28
|
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 |
|
|
jackv
Master Smack Fu Yak Hacker
2179 Posts |
Posted - 2011-05-25 : 14:36:42
|
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 usingJack Vamvas--------------------http://www.sqlserver-dba.com |
|
|
BigBear
Starting Member
3 Posts |
Posted - 2011-05-25 : 15:49:20
|
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) ); } ?> |
|
|
jackv
Master Smack Fu Yak Hacker
2179 Posts |
Posted - 2011-05-26 : 01:06:34
|
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 |
|
|
|
|
|