l!m!t Posted September 26, 2006 Share Posted September 26, 2006 Hello I am just learning PHP I am trying modify some login code to allow me in if my variables match. Basically I have this if ($check_customer['level'] == 2 ) { $HTTP_GET_VARS['login'] = 'invalid'; $messageStack->add('login', TEXT_NOT_APPROVED); } else {but want it so if I am level 2 and my IP = xxx xxxx xxx to let me inexample if ($check_customer['level'] == 2 ) { $HTTP_GET_VARS['login'] = 'invalid'; $messageStack->add('login', TEXT_NOT_APPROVED); } else { if ($_SERVER['REMOTE_ADDR'] != 123.12.124.23 && $row['level'] == 2 ){ LET ME INIm not sure if its formatted correctly, but maybe someone can help me I have been on this for 24 hours any help would be great.I just need it to approve me if I am level 2 and if my IP matches, but in needs to deny everyone who is just level 2Even if you have some example codes I can probably figure it out.Thanks for your time!! Quote Link to comment Share on other sites More sharing options...
steveclondon Posted September 26, 2006 Share Posted September 26, 2006 One thing to keep in mind with this is that even if you are on broadband you do not always get your own ip address. Providers normally give you an ip address on connection and this can change. Unless you know 100% for sure that you always have the same ip address on different connections I would not use this method. Also you can have more than one user using the same ip address. Quote Link to comment Share on other sites More sharing options...
l!m!t Posted September 26, 2006 Author Share Posted September 26, 2006 Hi thanks for the info I am acutally using a database option where I can update the address each time. I was just trying to keep the code simple read.Thanks for the reply! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.