Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Secure admin log in and log out


isolina

Recommended Posts

Posted

i have tried .htaccess and .htpasswd file under admin but didn't work.

the admin panel for id and pwd shows up but after i put the password it goes right back to the admin panel and doesn't take me to the admin directory.

 

so i went to contributuion and downloaded files and instructions. but quite difficult to follow the sql set up.

 

the following is the sql data table set up instruction but don't know how to do with it.

i can copy and paste the script to the sql window after i created administrator at the data table. but the last 2 lines with

insert into -> i don't know how to put that with administrator table.

if anyone knows, please i need your help urgently.

 

 

-- --------------------------------------------------------

 

--

-- Table structure for table `administrator`

--

 

CREATE TABLE `administrator` (

`ID` int(10) unsigned NOT NULL auto_increment,

`sName` varchar(255) NOT NULL default '',

`sPassword` varchar(255) NOT NULL default '',

`sGUID` varchar(32) default NULL,

`sData` text,

PRIMARY KEY (`ID`)

) TYPE=MyISAM AUTO_INCREMENT=3 ;

 

--

-- Dumping data for table `administrator`

--

 

INSERT INTO `administrator` VALUES (1, 'username1', password('your_password1'), NULL, NULL);

INSERT INTO `administrator` VALUES (2, 'username2', password('your_password2'), NULL, NULL);

 

 

-- NOTE: Please make changes in the INSERT INTO lines above before loading into PHPMyAdmin

-- Replace username1 and username2 with your usernames. Leave the single quotes around 'username'.

-- Replace your_password1 and your_password2 with your passwords. Leave the single quotes around 'your_password'.

-- Note the use of MySql's password() function. This is a one-way function so

-- you will not be able to "retrieve" the user's password.

 

Isolina

Posted

You Need To Into Your Webhosts Control Panel ! Find Phpmyadmin Or Where You Put Your Database If Its Phpmyadmin Once Logged In Click The Little Sql Button On The Left Hand Side

 

myadmin.gif

 

Then Insert The Script

 

-- --------------------------------------------------------

 

--

-- Table structure for table `administrator`

--

 

CREATE TABLE `administrator` (

`ID` int(10) unsigned NOT NULL auto_increment,

`sName` varchar(255) NOT NULL default '',

`sPassword` varchar(255) NOT NULL default '',

`sGUID` varchar(32) default NULL,

`sData` text,

PRIMARY KEY (`ID`)

) TYPE=MyISAM AUTO_INCREMENT=3 ;

 

--

-- Dumping data for table `administrator`

--

 

INSERT INTO `administrator` VALUES (1, 'username1', password('your_password1'), NULL, NULL);

INSERT INTO `administrator` VALUES (2, 'username2', password('your_password2'), NULL, NULL);

 

Make Sure You Change Your Username To What You Want It To be And You Password but Between The '

 

For Example

 

INSERT INTO `administrator` VALUES (1, 'USERNAME HERE', password('PASSWORD HERE'), NULL, NULL);
INSERT INTO `administrator` VALUES (2, 'USERNAME 2 HERE', password('PASSWORD2 HERE'), NULL, NULL);

 

then click The Go Button ! DONE

 

Hope it Helps

 

Mike

Posted

you meant this??

just copy and paste and click to go??

does insert into coding goes inside of () or outside of ()??

just want to make sure before i try.

 

CREATE TABLE `administrator` (

`ID` int(10) unsigned NOT NULL auto_increment,

`sName` varchar(255) NOT NULL default '',

`sPassword` varchar(255) NOT NULL default '',

`sGUID` varchar(32) default NULL,

`sData` text,

PRIMARY KEY (`ID`)

) TYPE=MyISAM AUTO_INCREMENT=3 ;

INSERT INTO `administrator` VALUES (1, 'username1', password('your_password1'), NULL, NULL);

INSERT INTO `administrator` VALUES (2, 'username2', password('your_password2'), NULL, NULL);

 

Isolina

Posted

Basicly With Mysql Ill Break It Down !

 

CREATE TABLE `administrator`

That Creats The Administrator Table

 

The Next Part

 

(
`ID` int(10) unsigned NOT NULL auto_increment,
`sName` varchar(255) NOT NULL default '',
`sPassword` varchar(255) NOT NULL default '',
`sGUID` varchar(32) default NULL,
`sData` text,
PRIMARY KEY (`ID`)
) TYPE=MyISAM AUTO_INCREMENT=3;

 

Is What Makes The Information In The Administrator Table

 

 

This

 

INSERT INTO `administrator` VALUES (1, 'username1', password('your_password1'), NULL, NULL);
INSERT INTO `administrator` VALUES (2, 'username2', password('your_password2'), NULL, NULL);

 

Is What Is Inserted Into The Table !

 

So If You Edit The Peices I Put <-Username-> & <--Password--> ( Taking The <--> Out Lol ) And Replace It With Your Username And Password Your Sorted

 

CREATE TABLE `administrator` (
`ID` int(10) unsigned NOT NULL auto_increment,
`sName` varchar(255) NOT NULL default '',
`sPassword` varchar(255) NOT NULL default '',
`sGUID` varchar(32) default NULL,
`sData` text,
PRIMARY KEY (`ID`)
) TYPE=MyISAM AUTO_INCREMENT=3;
INSERT INTO `administrator` VALUES (1, '<--Username-->', password('<--Password-->'), NULL, NULL);
INSERT INTO `administrator` VALUES (2, '<--Username 2-->', password('<--Password2-->'), NULL, NULL);

 

Does This Help ??

Posted

so the first part of coding is the data table sink and the second part of coding is the data set working with the data table.

so when i do coding, i have to put first part of data table coding and the second part of the coding together.

right??

 

Isolina

Posted

i just did it and got this error.

do you know how to fix this error??

 

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ID` int(10) unsigned NOT NULL auto_increment,

`sName` varchar(255) NOT NULL def' at line 2

 

 

SOS !!!

 

Isolina

Posted

i just did it and got this error.

do you know how to fix this error??

 

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ID` int(10) unsigned NOT NULL auto_increment,

`sName` varchar(255) NOT NULL def' at line 2

 

 

SOS !!!

 

Isolina

Posted

my hosting company is godaddy.

 

actually that was my mistake. i fixed the syntax error but it doesn't work.

after all the works is done and finished. i went to my site/admin. can't find a page and it doesn't take me the the secure admin control panel.

 

i did it 3 times already.

am i missing anything here??

 

SOS !!

 

Isolina

Posted

my hosting company is godaddy.

 

actually that was my mistake. i fixed the syntax error but it doesn't work.

after all the works is done and finished. i went to my site/admin. can't find a page and it doesn't take me the the secure admin control panel.

 

i did it 3 times already.

am i missing anything here??

 

SOS !!

 

Isolina

Posted

also this is what i see on sql window.

 

SQL query:CREATE TABLE `administrator` (

`ID` int( 10 ) unsigned NOT NULL AUTO_INCREMENT ,

`sName` varchar( 255 ) NOT NULL default '',

`sPassword` varchar( 255 ) NOT NULL default '',

`sGUID` varchar( 32 ) default NULL ,

`sData` text,

PRIMARY KEY ( `ID` )

) TYPE = MYISAM AUTO_INCREMENT =3;# MySQL returned an empty result set (i.e. zero rows).

INSERT INTO `administrator`

VALUES ( 1, 'isolina', password( 'lina1030' ) , NULL , NULL ) ;# Affected rows: 1

INSERT INTO `administrator`

VALUES ( 2, 'admin', password( 'rator' ) , NULL , NULL ) ;# Affected rows: 1

 

does this help to understand my problem??

 

Isolina

Archived

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

×
×
  • Create New...