Jump to content


Photo
* * * * - 4 votes

[PHP] - [Admin Control Panel w/ sessions] - [Gio]


  • Please log in to reply
29 replies to this topic

#21 nygorn

nygorn

    Young Padawan

  • Members
  • Pip
  • 54 posts
  • Gender:Male
  • Location:Sweden

Posted 15 July 2005 - 07:58 AM

what about mysql code?

I havent use mysql so often and when i do its only copy and paste codes.. ;)

#22 jjams

jjams

    Young Padawan

  • Members
  • Pip
  • 10 posts
  • Location:Houston Texas
  • Interests:Computers, Web Design, DJ'ing .....

Posted 11 August 2005 - 05:16 AM

Ok say I am newbie at mysql and php (cause I am) now would setup the database for this or does it use one? :D

#23 brent

brent

    Young Padawan

  • Members
  • Pip
  • 72 posts
  • Location:Tennessee

Posted 11 August 2005 - 04:38 PM

thank you, thank you, thank you for this tut...it will definately help me out with my php experience....

#24 ashanti

ashanti

    Young Padawan

  • Members
  • Pip
  • 33 posts
  • Location:Finland
  • Interests:Soccer, GFX, Webdesign & The Ladies and Clubbin'

Posted 18 August 2005 - 06:50 AM

$q="SELECT * from login where username='$username' and pw='$pw'";

this means what ? :P what should i insert here ...

#25 Shifty

Shifty

    Young Padawan

  • Members
  • Pip
  • 19 posts

Posted 22 October 2005 - 06:01 PM

try,

CREATE TABLE `login` (
`id` MEDIUMINT( 5 ) NOT NULL AUTO_INCREMENT ,
`username` VARCHAR NOT NULL ,
`pw` VARCHAR( 50 ) NOT NULL ,
PRIMARY KEY ( `id` )
) TYPE = MYISAM;

If iam wrong iam sure someone will post :yoda:

EDIT: fixed

Edited by Shifty, 22 October 2005 - 06:03 PM.


#26 nygorn

nygorn

    Young Padawan

  • Members
  • Pip
  • 54 posts
  • Gender:Male
  • Location:Sweden

Posted 05 January 2006 - 05:40 PM

well, i just love this tutorial, but if i want diffrent access levels ?
Like:
1 = News poster
2= Tutorial Writer
3= Moderator
4= Movie maker
Etc.
And on level 10 its admin, that has access to all :)
I mean, If you got level 4 you get access to 1,2,3 and 4.
If you have 1 you only got access to level 1..
You know what i mean ?

#27 nmy

nmy

    Young Padawan

  • Members
  • Pip
  • 1 posts

Posted 03 February 2006 - 09:40 PM

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /hsphere/local/home/c10300/chill-works.com/scripts/test/protected.php:2) in /hsphere/local/home/c10300/chill-works.com/scripts/test/protected.php on line 4


Whats wrong?

#28 mikem

mikem

    Young Padawan

  • Members
  • Pip
  • 11 posts
  • Gender:Male
  • Location:Fort Bragg, NC

Posted 15 February 2006 - 01:52 PM

try,

CREATE TABLE `login` (
`id` MEDIUMINT( 5 ) NOT NULL AUTO_INCREMENT ,
`username` VARCHAR NOT NULL ,
`pw` VARCHAR( 50 ) NOT NULL ,
PRIMARY KEY ( `id` )
) TYPE = MYISAM;

If iam wrong iam sure someone will post :(

EDIT: fixed

Actually Shifty, I hae just been working on it, and it seems to be the right SQL Inserts. So yes folks, this sql works as well.
Below is the SQL file you can just upload using your phpmyadmin.
If you look at the codes correctly people, you can easily tell whats what incase you want to make extra tables.

http://www.novamods....&type=post&id=1



#29 Kai Sellgren

Kai Sellgren

    Young Padawan

  • Members
  • Pip
  • 10 posts

Posted 25 February 2007 - 05:34 PM

You could replace if (mysql_num_rows($result) == 0) with if(!$result).

Works just as well and saves some time :D

Actually it does not work the same way.

#30 Egemen Sarica

Egemen Sarica

    Young Padawan

  • Members
  • Pip
  • 1 posts
  • Gender:Male

Posted 05 August 2007 - 04:48 AM

CREATE TABLE `login` (
  `id` bigint(255) NOT NULL auto_increment,
  `username` longtext NOT NULL,
  `pw` longtext NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM;

INSERT INTO `login` VALUES (2, 'admin', 'admin');

It's true?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users