Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Login check a table not session


koollayed

Recommended Posts

Posted

Hi Oscommerce,

 

I'm new to php. I want the login to check a member_flag2 table in my database under customers to see if it is equal to '' to allow access. I have tried ever combination on the pages that require login. My code looks like

 


 require('includes/application_top.php');

 if ($customers['member_flag2']=='') {

   $navigation->set_snapshot();

   tep_redirect(tep_href_link(FILENAME_LOGIN1, '', 'SSL'));

 

I want to force a login regardless and check member_flag2 for a blank field to allow access.

 

Any help is greatly appreciated.

 

Thanks

Posted

Hi Oscommerce,

 

I'm new to php. I want the login to check a member_flag2 table in my database under customers to see if it is equal to '' to allow access. I have tried ever combination on the pages that require login. My code looks like

 


 require('includes/application_top.php');

 if ($customers['member_flag2']=='') {

   $navigation->set_snapshot();

   tep_redirect(tep_href_link(FILENAME_LOGIN1, '', 'SSL'));

 

I want to force a login regardless and check member_flag2 for a blank field to allow access.

 

Any help is greatly appreciated.

 

Thanks

 

Checkout this add-on Require login to view site

Posted

You could also look at the member approval add-ons, I expect they chack a flag before letting you log-in.

 

HTH

 

G

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Posted

You could also look at the member approval add-ons, I expect they chack a flag before letting you log-in.

 

HTH

 

G

 

I don't think this checks for a flag. I thought about adding an and to the session part but cannot figure out the code.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...